Add Ctrl+U shortcut for switching user

This is a key combination that doesn't seem to be used either in NeoChat
nor with a common meaning in other chat clients, so let's use it for
switching the user.
This commit is contained in:
Kevin Wolf
2023-02-21 17:08:59 +01:00
committed by Tobias Fella
parent d7bd9f4609
commit 386f637b94

View File

@@ -74,7 +74,7 @@ QQC2.ToolBar {
}
visible: switchUserButton.checked
onVisibleChanged: if (visible) focus = true
onVisibleChanged: if (visible) accounts.forceActiveFocus()
clip: true
model: AccountRegistry
@@ -183,6 +183,10 @@ QQC2.ToolBar {
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
Layout.minimumWidth: Layout.preferredWidth
Layout.alignment: Qt.AlignRight
Shortcut {
sequence: "Ctrl+U"
onActivated: switchUserButton.toggle()
}
}
QQC2.ToolButton {
icon.name: "list-add"