diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-08-26 14:18:51 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-08-26 14:18:51 +0800 |
| commit | d0e6182583af1fd2a7080b3a7245b84fe2e8692a (patch) | |
| tree | ba71c027a543a10453446dbe2251de3bac698e9a | |
| parent | 13ccf9f49527950b12d2e000e2e79b6fe4d76afc (diff) | |
Revert "MouseArea: attempt to replace all MouseArea to modern non stealing"
This reverts commit a41ab9ad95b4f8e053af82741a45f747e77ff37a.
HoverHandler's point is spammy
| -rw-r--r-- | bar/Network.qml | 8 | ||||
| -rw-r--r-- | bar/Power.qml | 15 | ||||
| -rw-r--r-- | bar/TimeDate.qml | 8 | ||||
| -rw-r--r-- | bar/Workspace.qml | 5 | ||||
| -rw-r--r-- | popups/launcher/components/App.qml | 16 | ||||
| -rw-r--r-- | popups/launcher/components/Emoji.qml | 16 | ||||
| -rw-r--r-- | popups/launcher/components/Spell.qml | 15 |
7 files changed, 33 insertions, 50 deletions
diff --git a/bar/Network.qml b/bar/Network.qml index fbd1d91..a343977 100644 --- a/bar/Network.qml +++ b/bar/Network.qml @@ -111,12 +111,10 @@ Item { } } } - - HoverHandler { + MouseArea { + anchors.fill: container cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onClicked: { root.isCollapsed = !root.isCollapsed; } } diff --git a/bar/Power.qml b/bar/Power.qml index 02da1f1..a29bc4a 100644 --- a/bar/Power.qml +++ b/bar/Power.qml @@ -110,13 +110,14 @@ Item { } } - HoverHandler { - onHoveredChanged: { - if (!hovered) { - root.collapsed = true; - } else { - root.collapsed = false; - } + MouseArea { + anchors.fill: parent + hoverEnabled: true + onEntered: { + root.collapsed = false; + } + onExited: { + root.collapsed = true; } } } diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index 68a5a52..2716e6d 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -123,12 +123,10 @@ Item { } } } - - HoverHandler { + MouseArea { + anchors.fill: parent cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onPressed: { root.isAlt = !root.isAlt; } } diff --git a/bar/Workspace.qml b/bar/Workspace.qml index 1366c2d..3f0709a 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -236,11 +236,10 @@ Item { else Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`); } else if (event.angleDelta.y > 0) { - if (root.activeIndex + 1 > 1) { + if (root.activeIndex + 1 > 1) Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`); - } else if (Bar.wss > 1) { + else if (Bar.wss > 1) Hyprland.dispatch(`hl.dsp.focus({ workspace = '${Bar.wss}' })`); - } } } } diff --git a/popups/launcher/components/App.qml b/popups/launcher/components/App.qml index f3ce41d..e9dbcfd 100644 --- a/popups/launcher/components/App.qml +++ b/popups/launcher/components/App.qml @@ -175,18 +175,14 @@ IComponent { } } - TapHandler { - acceptedButtons: Qt.LeftButton - onTapped: { + MouseArea { + anchors.fill: parent + hoverEnabled: true + onPositionChanged: { root.selectedIndex = index; - root._exec(); } - } - HoverHandler { - onPointChanged: { - if (hovered) { - root.selectedIndex = index; - } + onPressed: { + root._exec(); } } } diff --git a/popups/launcher/components/Emoji.qml b/popups/launcher/components/Emoji.qml index 5dc9cd6..97df7eb 100644 --- a/popups/launcher/components/Emoji.qml +++ b/popups/launcher/components/Emoji.qml @@ -174,17 +174,11 @@ IComponent { } } - HoverHandler { - onPointChanged: { - if (hovered) - root.selectedIndex = index; - } - } - TapHandler { - onTapped: { - root.selectedIndex = index; - root._exec(); - } + MouseArea { + anchors.fill: parent + hoverEnabled: true + onPositionChanged: root.selectedIndex = index + onPressed: root._exec() } } diff --git a/popups/launcher/components/Spell.qml b/popups/launcher/components/Spell.qml index 1f8a15c..31184ef 100644 --- a/popups/launcher/components/Spell.qml +++ b/popups/launcher/components/Spell.qml @@ -180,16 +180,13 @@ IComponent { color: index === selectedIndex ? Colors.foreground1 : Colors.foreground2 } - HoverHandler { - onPointChanged: { - if (hovered) { - root.selectedIndex = index; - } - } - } - TapHandler { - onTapped: { + MouseArea { + anchors.fill: parent + hoverEnabled: true + onPositionChanged: { root.selectedIndex = index; + } + onPressed: { root._exec(); } } |
