mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 17:46:46 +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
|
||||
|
||||
minSize: Qt.vector2d(300, 240)
|
||||
draggable: true
|
||||
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ Frame {
|
|||
}
|
||||
radius: hifi.dimensions.borderRadius
|
||||
|
||||
// Allow dragging of the window
|
||||
// Enable dragging of the window
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: window
|
||||
|
|
|
@ -42,6 +42,13 @@ Frame {
|
|||
radius: hifi.dimensions.borderRadius
|
||||
color: hifi.colors.faintGray
|
||||
|
||||
// Enable dragging of the window
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: window
|
||||
enabled: window.draggable
|
||||
}
|
||||
|
||||
Item {
|
||||
visible: frameContent.hasTitle
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -14,11 +14,13 @@ import "."
|
|||
|
||||
Window {
|
||||
id: window
|
||||
anchors.centerIn: parent
|
||||
modality: Qt.ApplicationModal
|
||||
destroyOnCloseButton: true
|
||||
destroyOnInvisible: true
|
||||
frame: ModalFrame{}
|
||||
frame: ModalFrame { }
|
||||
|
||||
property int colorScheme: hifi.colorSchemes.light
|
||||
property bool draggable: false
|
||||
|
||||
anchors.centerIn: draggable ? undefined : parent
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue