diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-19 18:57:48 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-19 20:50:46 +0800 |
| commit | a607f21ebaf6f7752626c1f568f90b36ec40c2c8 (patch) | |
| tree | 2b33d93aed3b28fa26a8dbda8a41c7bc7d6a9ac3 /shell.qml | |
| parent | 7419b49dbd9495f40f09d43bb26115a788d455d6 (diff) | |
feat(launcher): persist state between reloads
Diffstat (limited to 'shell.qml')
| -rw-r--r-- | shell.qml | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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 { |
