diff --git a/modules/wp/WallpaperPicker.qml b/modules/wp/WallpaperPicker.qml index 9505d09..41065b0 100644 --- a/modules/wp/WallpaperPicker.qml +++ b/modules/wp/WallpaperPicker.qml @@ -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 + } + } }