summaryrefslogtreecommitdiff
path: root/popups
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-08-21 23:08:58 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-08-21 23:08:58 +0800
commite3984139a232d78876af933d296b64f3959040c9 (patch)
tree2e091a45abca9e40a85452dadb556aed571d37db /popups
parent90c64daff5c5c51a44b137317a508db245ece58a (diff)
SelectionState: signal to force sync without dependency change(for
container change such as scrolling)
Diffstat (limited to 'popups')
-rw-r--r--popups/launcher/Launcher.qml9
-rw-r--r--popups/launcher/components/App.qml3
-rw-r--r--popups/launcher/components/SelectionState.qml1
3 files changed, 13 insertions, 0 deletions
diff --git a/popups/launcher/Launcher.qml b/popups/launcher/Launcher.qml
index 89de4d4..d3203eb 100644
--- a/popups/launcher/Launcher.qml
+++ b/popups/launcher/Launcher.qml
@@ -45,6 +45,7 @@ ILauncher {
}
Timer {
id: selectionSync
+ // TODO: evaluate weather i just leave it running repeat, might be costy though
running: false
repeat: false
// sync w/ IComponent y animation duration
@@ -429,4 +430,12 @@ ILauncher {
implicitWidth: container.width
implicitHeight: container.height
+
+ Connections {
+ target: launcher?.state
+
+ function onSyncSelectionState() {
+ selectionSync.running = true;
+ }
+ }
}
diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml
index f9c63e3..141c0ee 100644
--- a/popups/launcher/components/App.qml
+++ b/popups/launcher/components/App.qml
@@ -171,6 +171,9 @@ IComponent {
}
}
}
+ onContentYChanged: {
+ SelectionState.syncSelectionState();
+ }
}
}
}
diff --git a/popups/launcher/components/SelectionState.qml b/popups/launcher/components/SelectionState.qml
index 212bd1d..8ca907f 100644
--- a/popups/launcher/components/SelectionState.qml
+++ b/popups/launcher/components/SelectionState.qml
@@ -24,6 +24,7 @@ Singleton {
property alias selectedPriority: persist.selectedPriority
property alias previousSelectedPriority: persist.previousSelectedPriority
property var widgets: []
+ signal syncSelectionState
onSelectedPriorityChanged: {
if (selectedPriority > previousSelectedPriority) {