From af52ea407d10c86a2e5b5049cddb6abdee3952f8 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 22 Aug 2026 17:11:29 +0800 Subject: fix: selectedPriority not respecting mouse --- popups/launcher/components/App.qml | 1 + popups/launcher/components/Clip.qml | 8 ++++---- popups/launcher/components/Emoji.qml | 1 + popups/launcher/components/IComponent.qml | 4 ++++ popups/launcher/components/Spell.qml | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml index 141c0ee..f3c5eeb 100644 --- a/popups/launcher/components/App.qml +++ b/popups/launcher/components/App.qml @@ -111,6 +111,7 @@ IComponent { if (selectedIndex < 0 || selectedIndex >= listView.count || !root.visible) return; + state.selectedPriority = root.getSelfPriority(); state.selected = listView.itemAtIndex(selectedIndex); }); } diff --git a/popups/launcher/components/Clip.qml b/popups/launcher/components/Clip.qml index a180b80..2552b60 100644 --- a/popups/launcher/components/Clip.qml +++ b/popups/launcher/components/Clip.qml @@ -77,6 +77,8 @@ IComponent { Qt.callLater(() => { if (!root.visible || selectedIndex < 0 || selectedIndex >= listView.count) return; + + state.selectedPriority = root.getSelfPriority(); state.selected = listView.itemAtIndex(selectedIndex); }); } @@ -188,8 +190,8 @@ IComponent { id: loader sourceComponent: clipHist[selectedIndex]?.type === "image" ? img : text property Component text: ITextEdit { - animate: true id: textEdit + animate: true readOnly: true wrapMode: TextEdit.Wrap width: preview.width @@ -209,7 +211,5 @@ IComponent { } } - Component.onCompleted: { - - } + Component.onCompleted: {} } diff --git a/popups/launcher/components/Emoji.qml b/popups/launcher/components/Emoji.qml index 8160894..88969c6 100644 --- a/popups/launcher/components/Emoji.qml +++ b/popups/launcher/components/Emoji.qml @@ -95,6 +95,7 @@ IComponent { if (!loader.view || selectedIndex < 0 || selectedIndex >= loader.view.count || !root.visible) return; + state.selectedPriority = root.getSelfPriority(); state.selected = loader.view.itemAtIndex(selectedIndex); }); } diff --git a/popups/launcher/components/IComponent.qml b/popups/launcher/components/IComponent.qml index 7450ffd..719ae94 100644 --- a/popups/launcher/components/IComponent.qml +++ b/popups/launcher/components/IComponent.qml @@ -60,6 +60,10 @@ IRect { close(); } + function getSelfPriority() { + return state.priorities.indexOf(root); + } + // this doesn't change launcher size but only hides the actual content but the outside still think the content is there visible: active opacity: valid ? 1 : 0 diff --git a/popups/launcher/components/Spell.qml b/popups/launcher/components/Spell.qml index c627b9e..8dece7e 100644 --- a/popups/launcher/components/Spell.qml +++ b/popups/launcher/components/Spell.qml @@ -118,6 +118,7 @@ IComponent { if (!loader.view || selectedIndex < 0 || selectedIndex >= loader.view.count || !root.visible) return; + state.selectedPriority = root.getSelfPriority(); state.selected = loader.view.itemAtIndex(selectedIndex); }); } -- cgit v1.2.3