summaryrefslogtreecommitdiff
path: root/shell.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-08-19 18:57:48 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-08-19 20:50:46 +0800
commita607f21ebaf6f7752626c1f568f90b36ec40c2c8 (patch)
tree2b33d93aed3b28fa26a8dbda8a41c7bc7d6a9ac3 /shell.qml
parent7419b49dbd9495f40f09d43bb26115a788d455d6 (diff)
feat(launcher): persist state between reloads
Diffstat (limited to 'shell.qml')
-rw-r--r--shell.qml16
1 files changed, 14 insertions, 2 deletions
diff --git a/shell.qml b/shell.qml
index 085190d..7ef4362 100644
--- a/shell.qml
+++ b/shell.qml
@@ -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 {