summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-09-01 23:50:33 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-09-01 23:50:33 +0800
commit6a697082ade32e15c534d05da7ae0b9f12f019d0 (patch)
tree1ec7bd95831a5e82955d25f969635041bcacc134
parentbee452a0240fba8f1e17e6bcbadb5ed577c32d67 (diff)
revert: redesign to make the next selectedpriority overwrite instead
-rw-r--r--popups/launcher/Launcher.qml1
-rw-r--r--popups/launcher/components/App.qml12
-rw-r--r--popups/launcher/components/Clip.qml14
-rw-r--r--popups/launcher/components/IComponent.qml4
4 files changed, 16 insertions, 15 deletions
diff --git a/popups/launcher/Launcher.qml b/popups/launcher/Launcher.qml
index adacc24..fd6b851 100644
--- a/popups/launcher/Launcher.qml
+++ b/popups/launcher/Launcher.qml
@@ -429,7 +429,6 @@ ILauncher {
}
if (set !== 0) {
- launcher.state.priorities[launcher.state.selectedPriority].leave();
switch (set) {
case 1:
if (launcher.state.selectedPriority < launcher.state.priorities.length - 1) {
diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml
index 89f3611..a44b2ec 100644
--- a/popups/launcher/components/App.qml
+++ b/popups/launcher/components/App.qml
@@ -111,6 +111,13 @@ IComponent {
syncSelectionState: function () {
Qt.callLater(() => {
+ if (!isSelectedPriority()) {
+ if (state.selected === listView.itemAtIndex(selectedIndex))
+ state.selected = null;
+
+ return;
+ }
+
if (selectedIndex < 0 || selectedIndex >= listView.count || !root.visible)
return;
@@ -119,11 +126,6 @@ IComponent {
});
}
- onLeave: {
- if (state.selected === listView.itemAtIndex(selectedIndex))
- state.selected = null;
- }
-
IInnerComponent {
id: layout
fromParent: false
diff --git a/popups/launcher/components/Clip.qml b/popups/launcher/components/Clip.qml
index 418ced7..ab2721f 100644
--- a/popups/launcher/components/Clip.qml
+++ b/popups/launcher/components/Clip.qml
@@ -73,6 +73,14 @@ IComponent {
syncSelectionState: function () {
Qt.callLater(() => {
+ if (!isSelectedPriority()) {
+ // TODO: fix sometimes
+ if (state.selected && state.selected === listView.itemAtIndex(selectedIndex))
+ state.selected = null;
+
+ return;
+ }
+
if (!root.visible || selectedIndex < 0 || selectedIndex >= listView.count)
return;
@@ -81,12 +89,6 @@ IComponent {
});
}
- onLeave: {
- // TODO: fix sometimes
- if (state.selected && state.selected === listView.itemAtIndex(selectedIndex))
- state.selected = null;
- }
-
IInnerComponent {
id: layout
fromParent: false
diff --git a/popups/launcher/components/IComponent.qml b/popups/launcher/components/IComponent.qml
index 70d2576..90c3ab8 100644
--- a/popups/launcher/components/IComponent.qml
+++ b/popups/launcher/components/IComponent.qml
@@ -66,8 +66,6 @@ IRect {
})
signal close
- // SAFETY: implementer should include safety checks
- signal leave
function _exec() {
if (!exec())
@@ -129,7 +127,7 @@ IRect {
if (hovered)
root.trySetSelfPriority();
else
- root.leave();
+ root.syncSelectionState();
}
}