Added closing via press of esc

This commit is contained in:
Hannes
2026-03-02 00:48:55 +01:00
parent 309a0d1219
commit 1d58e3ee2b
+25 -1
View File
@@ -14,6 +14,23 @@ PanelWindow {
visible: true
focusable: true
FocusScope {
id: pickerScope
focus: true
Keys.onReleased: {
if (event.key === Qt.Key_Escape) {
console.log("Pressed Escape, closing Wallpaper Picker")
wallpaperLoader.active = false
}
}
Rectangle {
anchors.fill: parent
color: "lightblue"
}
}
Rectangle {
anchors.fill: parent
radius: 10
@@ -42,10 +59,17 @@ PanelWindow {
background: Rectangle {
radius: 12
color: "#2b2b2b"
color: filterText.activeFocus ? Colors.tertiary_fg : Colors.primary_fg
border.color: filterText.activeFocus ? Colors.tertiary : Colors.primary
border.width: 1
}
Keys.onReleased: {
if (event.key === Qt.Key_Escape) {
console.log("Escape pressed inside TextField")
console.log("Pressed Escape, closing Wallpaper Picker")
wallpaperLoader.active = false
}
}
}