From a607f21ebaf6f7752626c1f568f90b36ec40c2c8 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 19 Aug 2025 18:57:48 +0800 Subject: feat(launcher): persist state between reloads --- shell.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'shell.qml') 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 { -- cgit v1.2.3