Added closing via press of esc
This commit is contained in:
@@ -14,6 +14,23 @@ PanelWindow {
|
|||||||
visible: true
|
visible: true
|
||||||
focusable: 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 {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 10
|
radius: 10
|
||||||
@@ -42,10 +59,17 @@ PanelWindow {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
||||||
radius: 12
|
radius: 12
|
||||||
color: "#2b2b2b"
|
color: filterText.activeFocus ? Colors.tertiary_fg : Colors.primary_fg
|
||||||
border.color: filterText.activeFocus ? Colors.tertiary : Colors.primary
|
border.color: filterText.activeFocus ? Colors.tertiary : Colors.primary
|
||||||
border.width: 1
|
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