mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Add a shortcut for search
This commit is contained in:
parent
f1c1f18f81
commit
f2f9359f7f
1 changed files with 8 additions and 2 deletions
|
@ -33,6 +33,11 @@ Pane {
|
||||||
searchField.text = ""
|
searchField.text = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
sequence: StandardKey.Find
|
||||||
|
onActivated: searchButton.searchActive = !searchButton.searchActive
|
||||||
|
}
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: topLayout.height + Nheko.paddingMedium * 2
|
implicitHeight: topLayout.height + Nheko.paddingMedium * 2
|
||||||
z: 3
|
z: 3
|
||||||
|
@ -268,8 +273,9 @@ Pane {
|
||||||
image: ":/icons/icons/ui/search.svg"
|
image: ":/icons/icons/ui/search.svg"
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: qsTr("Search this room")
|
ToolTip.text: qsTr("Search this room")
|
||||||
onClicked: {
|
onClicked: searchActive = !searchActive
|
||||||
searchActive = !searchActive
|
|
||||||
|
onSearchActiveChanged: {
|
||||||
if (searchActive) {
|
if (searchActive) {
|
||||||
searchField.forceActiveFocus();
|
searchField.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue