diff --git a/TODO.md b/TODO.md index 71d36f3a..92ecdd25 100644 --- a/TODO.md +++ b/TODO.md @@ -26,7 +26,6 @@ - Verify big avatars aren't downloaded uselessly - UI - - Esc in sidepane to focus chat again - Set an explicit placeholder text color for text field/area - Change typing bar background - Show error if uploading avatar fails or file is corrupted diff --git a/src/python/config_files.py b/src/python/config_files.py index 5642674b..97e3a9a8 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -106,6 +106,7 @@ class UISettings(JSONConfigFile): return { "alertOnMessageForMsec": 4000, "clearRoomFilterOnEnter": True, + "clearRoomFilterOnEscape": True, "theme": "Default.qpl", "writeAliases": {}, "keys": { diff --git a/src/qml/SidePane/SidePane.qml b/src/qml/SidePane/SidePane.qml index a5833a47..c4958bc8 100644 --- a/src/qml/SidePane/SidePane.qml +++ b/src/qml/SidePane/SidePane.qml @@ -95,6 +95,12 @@ Rectangle { sidePaneList.activate() } + Keys.onEscapePressed: { + if (window.settings.clearRoomFilterOnEscape) { + mainUI.sidePane.toolBar.roomFilter = "" + } + mainUI.pageLoader.forceActiveFocus() + } HColumnLayout {