Make escape key close OS customisation window

With the move from OS customisation being a popup to being a separate
window, it is no longer closed by the escape key.  Add a handler to
restore this behaviour.
This commit is contained in:
David Turner 2023-10-18 17:40:53 +01:00
parent 8a3331f613
commit 04a9b0d4ad

View file

@ -36,6 +36,12 @@ Window {
spacing: 10 spacing: 10
anchors.fill: parent anchors.fill: parent
// Keys handlers can only be attached to Items. Window is not an
// Item, but ColumnLayout is, so put this handler here.
Keys.onEscapePressed: {
popup.close()
}
ScrollView { ScrollView {
id: popupbody id: popupbody
font.family: roboto.name font.family: roboto.name