mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/folio: Clear krunner when closed
This commit is contained in:
parent
1e2a887c42
commit
2e83a910a3
2 changed files with 11 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ Item {
|
|||
queryField.forceActiveFocus();
|
||||
}
|
||||
|
||||
function clearField() {
|
||||
queryField.text = "";
|
||||
}
|
||||
|
||||
signal requestedClose()
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -410,6 +410,13 @@ Item {
|
|||
visible: opacity > 0
|
||||
transform: Translate { y: (1 - homeScreenState.searchWidgetOpenProgress) * (-Kirigami.Units.gridUnit * 2) }
|
||||
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
// clear search bar when closed
|
||||
searchWidget.clearField();
|
||||
}
|
||||
}
|
||||
|
||||
// focus the search bar if it opens
|
||||
Connections {
|
||||
target: Folio.HomeScreenState
|
||||
|
|
|
|||
Loading…
Reference in a new issue