[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,25 +35,36 @@ Rectangle {
state = "SHOWN"
}
MouseArea {
id: mouseTrap
FocusScope {
id: scope
anchors.fill: parent
onClicked: {
mouse.accepted = true
greySheet.state = "HIDDEN"
// Do not let focus leave this scope while form is open
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: [

View file

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