[GUI] UX tweaks
This commit is contained in:
parent
04392d3598
commit
419ab4f932
2 changed files with 28 additions and 19 deletions
|
|
@ -35,25 +35,36 @@ Rectangle {
|
||||||
state = "SHOWN"
|
state = "SHOWN"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
FocusScope {
|
||||||
id: mouseTrap
|
id: scope
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
|
||||||
mouse.accepted = true
|
// Do not let focus leave this scope while form is open
|
||||||
greySheet.state = "HIDDEN"
|
onFocusChanged: if (enabled && !focus) forceActiveFocus()
|
||||||
|
|
||||||
|
Keys.onEscapePressed: greySheet.state = "HIDDEN"
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseTrap
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
mouse.accepted = true
|
||||||
|
greySheet.state = "HIDDEN"
|
||||||
|
}
|
||||||
|
acceptedButtons: Qt.AllButtons
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
// This mouse area blocks clicks inside the form from reaching the mouseTrap
|
||||||
|
anchors.fill: formContainer
|
||||||
|
acceptedButtons: Qt.AllButtons
|
||||||
|
onClicked: mouse.accepted = true
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
id: formContainer
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: parent.width / 2
|
||||||
|
height: parent.height / 2
|
||||||
}
|
}
|
||||||
acceptedButtons: Qt.AllButtons
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: formContainer
|
|
||||||
acceptedButtons: Qt.AllButtons
|
|
||||||
onClicked: mouse.accepted = true
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
id: formContainer
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: parent.width / 2
|
|
||||||
height: parent.height / 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,6 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FormBox {
|
FormBox {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue