diff options
Diffstat (limited to 'modules/launcher/Content.qml')
| -rw-r--r-- | modules/launcher/Content.qml | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml index 7158cdd..f4e1b45 100644 --- a/modules/launcher/Content.qml +++ b/modules/launcher/Content.qml @@ -11,7 +11,6 @@ import QtQuick Item { id: root - required property var wrapper required property PersistentProperties visibilities required property var panels @@ -21,9 +20,6 @@ Item { implicitWidth: listWrapper.width + padding * 2 implicitHeight: searchWrapper.height + listWrapper.height + padding * 2 - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - Item { id: listWrapper @@ -37,7 +33,7 @@ Item { ContentList { id: list - wrapper: root.wrapper + content: root visibilities: root.visibilities panels: root.panels search: search @@ -129,23 +125,19 @@ Item { } } + Component.onCompleted: forceActiveFocus() + Connections { target: root.visibilities function onLauncherChanged(): void { - if (root.visibilities.launcher) - search.focus = true; - else { + if (!root.visibilities.launcher) search.text = ""; - const current = list.currentList; - if (current) - current.currentIndex = 0; - } } function onSessionChanged(): void { - if (root.visibilities.launcher && !root.visibilities.session) - search.focus = true; + if (!root.visibilities.session) + search.forceActiveFocus(); } } } |