mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 22:57:25 -04:00
Make dialogs draggable
This commit is contained in:
@@ -53,6 +53,15 @@ Window {
|
||||
width: 480
|
||||
height: 200
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
spacing: 10
|
||||
|
||||
Reference in New Issue
Block a user