diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-08-31 22:27:05 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-08-31 22:27:05 +0800 |
| commit | 661a39128a6bac569bc1c3881094ab486ac2bf24 (patch) | |
| tree | e98972b32a977c9926b018679e0e56aedd2febae /popups | |
| parent | cd70e50c546cc21b9463f6a49d35ea326319ae11 (diff) | |
IComponent: Qt.callLater on call site
Diffstat (limited to 'popups')
| -rw-r--r-- | popups/launcher/components/IComponent.qml | 27 |
1 files 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(); |
