Added closing via press of esc
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user