Let escape presses work properly inside HDrawer
Also add escape to clear member filter when focusing the field, and clearMemberFilterOnEscape setting.
This commit is contained in:
parent
45048e625c
commit
bbb00dd8a0
|
@ -224,6 +224,7 @@ class UISettings(JSONDataFile):
|
||||||
"compactMode": False,
|
"compactMode": False,
|
||||||
"clearRoomFilterOnEnter": True,
|
"clearRoomFilterOnEnter": True,
|
||||||
"clearRoomFilterOnEscape": True,
|
"clearRoomFilterOnEscape": True,
|
||||||
|
"clearMemberFilterOnEscape": True,
|
||||||
"collapseSidePanesUnderWindowWidth": 400,
|
"collapseSidePanesUnderWindowWidth": 400,
|
||||||
"hideProfileChangeEvents": True,
|
"hideProfileChangeEvents": True,
|
||||||
"hideMembershipEvents": False,
|
"hideMembershipEvents": False,
|
||||||
|
|
|
@ -24,7 +24,7 @@ Drawer {
|
||||||
position: 1
|
position: 1
|
||||||
visible: ! collapse
|
visible: ! collapse
|
||||||
modal: false
|
modal: false
|
||||||
closePolicy: Popup.CloseOnEscape
|
closePolicy: Popup.NoAutoClose
|
||||||
|
|
||||||
background: Rectangle { id: bg; color: theme.colors.strongBackground }
|
background: Rectangle { id: bg; color: theme.colors.strongBackground }
|
||||||
|
|
||||||
|
|
|
@ -207,9 +207,12 @@ HDrawer {
|
||||||
|
|
||||||
Keys.onUpPressed:
|
Keys.onUpPressed:
|
||||||
if (historyEntry + 1 < history.length ) historyEntry += 1
|
if (historyEntry + 1 < history.length ) historyEntry += 1
|
||||||
|
|
||||||
Keys.onDownPressed:
|
Keys.onDownPressed:
|
||||||
if (historyEntry - 1 >= -1) historyEntry -= 1
|
if (historyEntry - 1 >= -1) historyEntry -= 1
|
||||||
|
|
||||||
|
Keys.onEscapePressed: debugConsole.close()
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,11 @@ HColumnLayout {
|
||||||
onTextChanged:
|
onTextChanged:
|
||||||
py.callCoro("set_substring_filter", [modelSyncId, text])
|
py.callCoro("set_substring_filter", [modelSyncId, text])
|
||||||
|
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
roomPane.toggleFocus()
|
||||||
|
if (window.settings.clearMemberFilterOnEscape) text = ""
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on opacity { HNumberAnimation {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user