Merge pull request #1491

030ff09 mobile view: draggable window (xiphon)
This commit is contained in:
luigi1111 2018-07-17 16:43:41 -05:00
commit fb32dda5a1
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

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