Fix Ctrl + F not working

Fix Crtl + F not working by only having the shortcut assigned to a single searchfield. 
- Ctrl + F is now for the roomlist search
- The user search in the room drawer is now ctrl + shift + f
- for the emoji picker and qucik switcher these have the shortcut removed and focus is managed by the popup.

BUG: 462524
This commit is contained in:
James Graham
2023-01-03 18:06:51 +00:00
parent 93dd25f954
commit 666f247185
4 changed files with 25 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ ColumnLayout {
signal chosen(string emoji)
onActiveFocusChanged: if (activeFocus) {
searchField.forceActiveFocus()
}
spacing: 0
QQC2.ScrollView {
@@ -78,6 +82,12 @@ ColumnLayout {
id: searchField
Layout.margins: Kirigami.Units.smallSpacing
Layout.fillWidth: true
/**
* The focus is manged by the parent and we don't want to use the standard
* shortcut as it could block other SearchFields from using it.
*/
focusSequence: ""
}
EmojiGrid {

View File

@@ -40,6 +40,11 @@ QQC2.Popup {
// we used to be able to expect that the text field wouldn't attempt to
// perform a mini-DDOS attack using signals.
autoAccept: false
/**
* The focus is manged by the popup and we don't want to use the standard
* shortcut as it could block other SearchFields from using it.
*/
focusSequence: ""
Layout.preferredWidth: Kirigami.Units.gridUnit * 21 // 3 * 7 = 21, roughly 7 avatars on screen
Keys.onLeftPressed: cView.decrementCurrentIndex()