diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-07-17 16:43:41 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-07-17 16:43:41 -0500 |
| commit | fb32dda5a199b749566d95b0308b32b26c0b8338 (patch) | |
| tree | 7a9e05493e72828d3f2e58f21d6c22fccd710fdc | |
| parent | ceef6c8b6ddb3273624bd28410d13c71e2928a87 (diff) | |
| parent | 030ff0994dfefd966c0b3bfbe3634040f20da9c4 (diff) | |
| download | monzero-gui-fb32dda5a199b749566d95b0308b32b26c0b8338.tar.gz monzero-gui-fb32dda5a199b749566d95b0308b32b26c0b8338.tar.xz monzero-gui-fb32dda5a199b749566d95b0308b32b26c0b8338.zip | |
Merge pull request #1491
030ff09 mobile view: draggable window (xiphon)
| -rw-r--r-- | main.qml | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1294,6 +1294,25 @@ ApplicationWindow { anchors.left: parent.left anchors.right: parent.right height: visible? 65 * scaleRatio : 0 + + MouseArea { + enabled: persistentSettings.customDecorations + property var previousPosition + anchors.fill: parent + propagateComposedEvents: true + onPressed: previousPosition = globalCursor.getPosition() + onPositionChanged: { + if (pressedButtons == Qt.LeftButton) { + var pos = globalCursor.getPosition() + var dx = pos.x - previousPosition.x + var dy = pos.y - previousPosition.y + + appWindow.x += dx + appWindow.y += dy + previousPosition = pos + } + } + } } LeftPanel { |
