From 661a39128a6bac569bc1c3881094ab486ac2bf24 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 31 Aug 2026 22:27:05 +0800 Subject: IComponent: Qt.callLater on call site --- popups/launcher/components/IComponent.qml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/popups/launcher/components/IComponent.qml b/popups/launcher/components/IComponent.qml index 415d22d..90c3ab8 100644 --- a/popups/launcher/components/IComponent.qml +++ b/popups/launcher/components/IComponent.qml @@ -88,15 +88,13 @@ IRect { } function syncPriority() { - Qt.callLater(() => { - if (!standalone) { - if (state.priorities.includes(root) && !priority) - state.priorities = state.priorities.filter(x => x !== root); - else if (priority) - state.priorities = [...new Set(state.priorities), root]; - } else - state.priorities = [root]; - }); + if (!standalone) { + if (state.priorities.includes(root) && !priority) + state.priorities = state.priorities.filter(x => x !== root); + else if (priority) + state.priorities = [...new Set(state.priorities), root]; + } else + state.priorities = [root]; } // this doesn't change launcher size but only hides the actual content but the outside still think the content is there @@ -107,15 +105,14 @@ IRect { implicitWidth: valid ? Launcher.widgetWidth : 0 implicitHeight: valid ? Launcher.widgetHeight : 0 - // implicitWidth: Launcher.widgetWidth - // implicitHeight: Launcher.widgetHeight - radius: Launcher.widgetRadius color: Qt.rgba(Colors.background3.r, Colors.background3.g, Colors.background3.b, Launcher.widgetBgTransparency) // TODO when prioritized, highlight onPriorityChanged: { // sync with state.priorities - syncPriority(); + Qt.callLater(() => { + syncPriority(); + }); } Behavior on y { @@ -135,7 +132,9 @@ IRect { } Component.onCompleted: { - syncPriority(); + Qt.callLater(() => { + syncPriority(); + }); // Qt.callLater(() => { // syncSelectionState(); -- cgit v1.2.3