From ae750dbadf9139add77a172f4595077e8826e755 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 17 Aug 2025 16:08:27 +0800 Subject: fix(qs:launcher:standalone): allow different standaloneObj regression introduced in b66eeccf0a0248c36fb5026ee7ac806591387463 --- shell.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'shell.qml') diff --git a/shell.qml b/shell.qml index 6b8a394..e354ab2 100644 --- a/shell.qml +++ b/shell.qml @@ -7,7 +7,7 @@ import QtQuick Scope { id: root - property var standaloneObj: null + property var standaloneObj: ({}) Bar {} LazyLoader { id: launcherLoader @@ -31,11 +31,11 @@ Scope { } function standalone(component: string): void { - if (root.standaloneObj) { - root.standaloneObj.active = !root.standaloneObj.active; + if (root.standaloneObj.name === component) { + root.standaloneObj.obj.active = !root.standaloneObj.obj.active; return; } - root.standaloneObj = Qt.createQmlObject(` + root.standaloneObj.obj = Qt.createQmlObject(` import Quickshell import QtQuick import "launcher" @@ -71,6 +71,7 @@ Scope { } } `, root); + root.standaloneObj.name = component; } } -- cgit v1.2.3