diff options
| -rw-r--r-- | launcher/components/SelectionState.qml | 21 | ||||
| -rw-r--r-- | shell.qml | 16 |
2 files changed, 30 insertions, 7 deletions
diff --git a/launcher/components/SelectionState.qml b/launcher/components/SelectionState.qml index 20d7fdf..1ab577a 100644 --- a/launcher/components/SelectionState.qml +++ b/launcher/components/SelectionState.qml @@ -3,12 +3,24 @@ import Quickshell import QtQuick Singleton { + id: root + + PersistentProperties { + id: persist + reloadableId: "launcherSelectionState" + + property string input: "" + property int cursorPosition: 0 + property int selectedPriority: 0 + property int previousSelectedPriority: 0 + } + property Item selected: null - property string input: "" - property int cursorPosition: 0 + property alias input: persist.input + property alias cursorPosition: persist.cursorPosition property var priorities: [] - property int selectedPriority: 0 - property int previousSelectedPriority: 0 + property alias selectedPriority: persist.selectedPriority + property alias previousSelectedPriority: persist.previousSelectedPriority property var widgets: [] onSelectedPriorityChanged: { @@ -22,7 +34,6 @@ Singleton { previousSelectedPriority = selectedPriority; } - // order them based on widgets(which came from order from config) onPrioritiesChanged: { for (let i = priorities.length - 1; i >= 0; i--) @@ -7,12 +7,24 @@ import QtQuick Scope { id: root + property var standaloneObj: ({}) + Bar {} + + PersistentProperties { + id: loaderProp + reloadableId: "launcherLoaderProp" + + property bool active: false + } LazyLoader { id: launcherLoader + + active: loaderProp.active + component: Launcher { - parentLoader: launcherLoader + parentLoader: loaderProp } } @@ -27,7 +39,7 @@ Scope { target: "launcher" function toggle() { - launcherLoader.active = !launcherLoader.active; + loaderProp.active = !loaderProp.active; } function standalone(component: string): void { |
