mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
homescreens: also close the search widget with Meta key
This commit is contained in:
parent
f4e6d6b69a
commit
838826b4fd
3 changed files with 11 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ Item {
|
||||||
readonly property real closedContentY: PlasmaCore.Units.gridUnit * 5
|
readonly property real closedContentY: PlasmaCore.Units.gridUnit * 5
|
||||||
readonly property real openedContentY: 0
|
readonly property real openedContentY: 0
|
||||||
readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY))
|
readonly property real openFactor: Math.max(0, Math.min(1, 1 - flickable.contentY / closedContentY))
|
||||||
|
readonly property bool isOpen: openFactor != 0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,11 @@ MobileShell.HomeScreen {
|
||||||
MobileShell.TopPanelControls.closeActionDrawer();
|
MobileShell.TopPanelControls.closeActionDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always close the search widget as well
|
||||||
|
if (searchWidget.isOpen) {
|
||||||
|
searchWidget.close();
|
||||||
|
}
|
||||||
|
|
||||||
// there's a couple of steps:
|
// there's a couple of steps:
|
||||||
// - minimize windows (only if we are in an app)
|
// - minimize windows (only if we are in an app)
|
||||||
// - open app drawer
|
// - open app drawer
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,11 @@ MobileShell.HomeScreen {
|
||||||
MobileShell.TopPanelControls.closeActionDrawer();
|
MobileShell.TopPanelControls.closeActionDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always close the search widget as well
|
||||||
|
if (search.isOpen) {
|
||||||
|
search.close();
|
||||||
|
}
|
||||||
|
|
||||||
// there's a couple of steps:
|
// there's a couple of steps:
|
||||||
// - minimize windows (only if we are in an app)
|
// - minimize windows (only if we are in an app)
|
||||||
// - open app drawer
|
// - open app drawer
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue