Add a shortcut for search

pull/1161/head
Nicolas Werner 2 years ago
parent f1c1f18f81
commit f2f9359f7f
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 10
      resources/qml/TopBar.qml

@ -33,6 +33,11 @@ Pane {
searchField.text = ""
}
Shortcut {
sequence: StandardKey.Find
onActivated: searchButton.searchActive = !searchButton.searchActive
}
Layout.fillWidth: true
implicitHeight: topLayout.height + Nheko.paddingMedium * 2
z: 3
@ -268,8 +273,9 @@ Pane {
image: ":/icons/icons/ui/search.svg"
ToolTip.visible: hovered
ToolTip.text: qsTr("Search this room")
onClicked: {
searchActive = !searchActive
onClicked: searchActive = !searchActive
onSearchActiveChanged: {
if (searchActive) {
searchField.forceActiveFocus();
}

Loading…
Cancel
Save