summaryrefslogtreecommitdiff
path: root/popups
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-08-23 11:53:32 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-08-23 11:59:54 +0800
commita41ab9ad95b4f8e053af82741a45f747e77ff37a (patch)
treee420ff6c7949df0a7767235a82080eb958689e2d /popups
parent745c999f076f55becd4526c41c02b800c927e8ce (diff)
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..
Diffstat (limited to 'popups')
-rw-r--r--popups/launcher/components/App.qml16
-rw-r--r--popups/launcher/components/Emoji.qml16
-rw-r--r--popups/launcher/components/Spell.qml15
3 files changed, 30 insertions, 17 deletions
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();
}
}