1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-25 10:47:19 +01:00

mobile view: draggable window

This commit is contained in:
xiphon 2018-07-03 19:56:23 +03:00
parent cd46edb23f
commit 030ff0994d

View File

@ -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 {