From a41ab9ad95b4f8e053af82741a45f747e77ff37a Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 23 Aug 2026 11:53:32 +0800 Subject: MouseArea: attempt to replace all MouseArea to modern non stealing alternative mousearea anchor.fill parent of item/slider etc. that doesn't have width or height won't work with the modern alternative so.. --- popups/launcher/components/App.qml | 16 ++++++++++------ popups/launcher/components/Emoji.qml | 16 +++++++++++----- popups/launcher/components/Spell.qml | 15 +++++++++------ 3 files changed, 30 insertions(+), 17 deletions(-) (limited to 'popups') diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml index f3c5eeb..a6616c4 100644 --- a/popups/launcher/components/App.qml +++ b/popups/launcher/components/App.qml @@ -161,16 +161,20 @@ IComponent { } } - MouseArea { - anchors.fill: parent - hoverEnabled: true - onPositionChanged: { + TapHandler { + acceptedButtons: Qt.LeftButton + onTapped: { root.selectedIndex = index; - } - onPressed: { root._exec(); } } + HoverHandler { + onPointChanged: { + if (hovered) { + root.selectedIndex = index; + } + } + } } onContentYChanged: { SelectionState.syncSelectionState(); diff --git a/popups/launcher/components/Emoji.qml b/popups/launcher/components/Emoji.qml index 88969c6..62412d7 100644 --- a/popups/launcher/components/Emoji.qml +++ b/popups/launcher/components/Emoji.qml @@ -161,11 +161,17 @@ IComponent { } } - MouseArea { - anchors.fill: parent - hoverEnabled: true - onPositionChanged: root.selectedIndex = index - onPressed: root._exec() + HoverHandler { + onPointChanged: { + if (hovered) + root.selectedIndex = index; + } + } + TapHandler { + onTapped: { + root.selectedIndex = index; + root._exec(); + } } } diff --git a/popups/launcher/components/Spell.qml b/popups/launcher/components/Spell.qml index 8dece7e..5bb128d 100644 --- a/popups/launcher/components/Spell.qml +++ b/popups/launcher/components/Spell.qml @@ -173,13 +173,16 @@ IComponent { color: index === selectedIndex ? Colors.foreground1 : Colors.foreground2 } - MouseArea { - anchors.fill: parent - hoverEnabled: true - onPositionChanged: { - root.selectedIndex = index; + HoverHandler { + onPointChanged: { + if (hovered) { + root.selectedIndex = index; + } } - onPressed: { + } + TapHandler { + onTapped: { + root.selectedIndex = index; root._exec(); } } -- cgit v1.2.3