Rename filterRooms keybind to FocusSidePane

This commit is contained in:
miruka 2019-08-19 13:55:21 -04:00
parent 36dd6457ea
commit af14038909
4 changed files with 14 additions and 8 deletions

View File

@ -1,4 +1,5 @@
- Refactoring
- Filter smart case
- Make all icon SVG files white/black, since we can now use ColorOverlay
- Make the icon blue in EditAccount when hovering and no avatar set

View File

@ -118,7 +118,7 @@ class UISettings(JSONConfigFile):
"reloadConfig": ["Alt+Shift+R"],
"scrollUp": ["Alt+Up", "Alt+K"],
"scrollDown": ["Alt+Down", "Alt+J"],
"filterRooms": ["Alt+S", "Ctrl+S"],
"focusSidePane": ["Alt+S", "Ctrl+S"],
"goToPreviousRoom": ["Alt+Shift+Up", "Alt+Shift+K"],
"goToNextRoom": ["Alt+Shift+Down", "Alt+Shift+J"],
"startDebugger": ["Alt+Shift+D"],

View File

@ -3,6 +3,7 @@ import QtQuick 2.12
Item {
property Item flickTarget: Item {}
function smartVerticalFlick(baseVelocity, fastMultiply=3) {
if (! flickTarget.interactive) { return }
@ -14,6 +15,12 @@ Item {
flickTarget.flick(0, baseVelocity * (fast ? fastMultiply : 1))
}
Shortcut {
sequences: settings.keys ? settings.keys.startDebugger : []
onActivated: if (debugMode) { py.call("APP.pdb") }
}
Shortcut {
sequences: settings.keys ? settings.keys.reloadConfig : []
onActivated: py.loadSettings(() => { mainUI.pressAnimation.start() })
@ -30,13 +37,8 @@ Item {
}
Shortcut {
sequences: settings.keys ? settings.keys.filterRooms : []
onActivated: mainUI.sidePane.paneToolBar.filterField.forceActiveFocus()
}
Shortcut {
sequences: settings.keys ? settings.keys.startDebugger : []
onActivated: if (debugMode) { py.call("APP.pdb") }
sequences: settings.keys ? settings.keys.focusSidePane : []
onActivated: mainUI.sidePane.forceActiveFocus()
}
Shortcut {

View File

@ -11,6 +11,7 @@ HRectangle {
color: theme.sidePane.background
property bool hasFocus: paneToolBar.filterField.activeFocus
property alias accountRoomList: accountRoomList
property alias paneToolBar: paneToolBar
@ -27,6 +28,8 @@ HRectangle {
}
}
onFocusChanged: if (focus) paneToolBar.filterField.forceActiveFocus()
onManualWidthChanged: {
window.uiState.sidePaneManualWidth = manualWidth
window.uiStateChanged()