aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-07-03 19:56:23 +0300
committerxiphon <xiphon@protonmail.com>2018-07-03 19:56:23 +0300
commit030ff0994dfefd966c0b3bfbe3634040f20da9c4 (patch)
tree419061b4de59dc02ee295ae2a7d2f5f15f758997
parentcd46edb23f0764b7bb7ee1171224881554be5d2f (diff)
downloadmonzero-gui-030ff0994dfefd966c0b3bfbe3634040f20da9c4.tar.gz
monzero-gui-030ff0994dfefd966c0b3bfbe3634040f20da9c4.tar.xz
monzero-gui-030ff0994dfefd966c0b3bfbe3634040f20da9c4.zip
mobile view: draggable window
-rw-r--r--main.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/main.qml b/main.qml
index 0672693c..776f2139 100644
--- a/main.qml
+++ b/main.qml
@@ -1295,6 +1295,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 {