aboutsummaryrefslogtreecommitdiff
path: root/components/StandardDialog.qml
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-05-03 11:08:59 +0200
committerJaquee <jaquee.monero@gmail.com>2017-05-03 11:08:59 +0200
commit8cd6f3f5b61af666824abbf710375054c6f2af35 (patch)
treee34ca313b3000eac7994afc88d26abd6cf9652b3 /components/StandardDialog.qml
parent4ca35af11ac8b41192bdb373216513e524ee4cb0 (diff)
downloadmonzero-gui-8cd6f3f5b61af666824abbf710375054c6f2af35.tar.gz
monzero-gui-8cd6f3f5b61af666824abbf710375054c6f2af35.tar.xz
monzero-gui-8cd6f3f5b61af666824abbf710375054c6f2af35.zip
Make dialogs draggable
Diffstat (limited to 'components/StandardDialog.qml')
-rw-r--r--components/StandardDialog.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml
index d4243b4b..681c2d3d 100644
--- a/components/StandardDialog.qml
+++ b/components/StandardDialog.qml
@@ -54,6 +54,14 @@ Window {
signal accepted()
signal rejected()
+ // Make window draggable
+ MouseArea {
+ anchors.fill: parent
+ property point lastMousePos: Qt.point(0, 0)
+ onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
+ onMouseXChanged: root.x += (mouseX - lastMousePos.x)
+ onMouseYChanged: root.y += (mouseY - lastMousePos.y)
+ }
function open() {
show()