homescreens: also close the search widget with Meta key

This commit is contained in:
Yari Polla 2022-09-25 20:23:57 +02:00 committed by Devin Lin
parent f4e6d6b69a
commit 838826b4fd
3 changed files with 11 additions and 0 deletions

View file

@ -58,6 +58,7 @@ Item {
readonly property real closedContentY: PlasmaCore.Units.gridUnit * 5
readonly property real openedContentY: 0
readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY))
readonly property bool isOpen: openFactor != 0
Rectangle {
anchors.fill: parent

View file

@ -46,6 +46,11 @@ MobileShell.HomeScreen {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (searchWidget.isOpen) {
searchWidget.close();
}
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer

View file

@ -45,6 +45,11 @@ MobileShell.HomeScreen {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (search.isOpen) {
search.close();
}
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer