mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 09:20:48 +02:00
Make file browser dialog movable
This commit is contained in:
parent
1c4eed640f
commit
9ec6b77460
4 changed files with 13 additions and 3 deletions
|
@ -30,6 +30,7 @@ ModalWindow {
|
||||||
implicitHeight: 480
|
implicitHeight: 480
|
||||||
|
|
||||||
minSize: Qt.vector2d(300, 240)
|
minSize: Qt.vector2d(300, 240)
|
||||||
|
draggable: true
|
||||||
|
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ Frame {
|
||||||
}
|
}
|
||||||
radius: hifi.dimensions.borderRadius
|
radius: hifi.dimensions.borderRadius
|
||||||
|
|
||||||
// Allow dragging of the window
|
// Enable dragging of the window
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
drag.target: window
|
drag.target: window
|
||||||
|
|
|
@ -42,6 +42,13 @@ Frame {
|
||||||
radius: hifi.dimensions.borderRadius
|
radius: hifi.dimensions.borderRadius
|
||||||
color: hifi.colors.faintGray
|
color: hifi.colors.faintGray
|
||||||
|
|
||||||
|
// Enable dragging of the window
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
drag.target: window
|
||||||
|
enabled: window.draggable
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
visible: frameContent.hasTitle
|
visible: frameContent.hasTitle
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -14,11 +14,13 @@ import "."
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id: window
|
id: window
|
||||||
anchors.centerIn: parent
|
|
||||||
modality: Qt.ApplicationModal
|
modality: Qt.ApplicationModal
|
||||||
destroyOnCloseButton: true
|
destroyOnCloseButton: true
|
||||||
destroyOnInvisible: true
|
destroyOnInvisible: true
|
||||||
frame: ModalFrame{}
|
frame: ModalFrame { }
|
||||||
|
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
|
property bool draggable: false
|
||||||
|
|
||||||
|
anchors.centerIn: draggable ? undefined : parent
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue