[GUI] UX tweaks

This commit is contained in:
Nathan Hourt 2015-07-14 15:33:52 -04:00
parent 04392d3598
commit 419ab4f932
2 changed files with 28 additions and 19 deletions

View file

@ -35,6 +35,15 @@ Rectangle {
state = "SHOWN" state = "SHOWN"
} }
FocusScope {
id: scope
anchors.fill: parent
// Do not let focus leave this scope while form is open
onFocusChanged: if (enabled && !focus) forceActiveFocus()
Keys.onEscapePressed: greySheet.state = "HIDDEN"
MouseArea { MouseArea {
id: mouseTrap id: mouseTrap
anchors.fill: parent anchors.fill: parent
@ -45,6 +54,7 @@ Rectangle {
acceptedButtons: Qt.AllButtons acceptedButtons: Qt.AllButtons
} }
MouseArea { MouseArea {
// This mouse area blocks clicks inside the form from reaching the mouseTrap
anchors.fill: formContainer anchors.fill: formContainer
acceptedButtons: Qt.AllButtons acceptedButtons: Qt.AllButtons
onClicked: mouse.accepted = true onClicked: mouse.accepted = true
@ -55,6 +65,7 @@ Rectangle {
width: parent.width / 2 width: parent.width / 2
height: parent.height / 2 height: parent.height / 2
} }
}
states: [ states: [
State { State {

View file

@ -113,8 +113,6 @@ ApplicationWindow {
} }
} }
} }
} }
FormBox { FormBox {