summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bar/Network.qml8
-rw-r--r--bar/Power.qml15
-rw-r--r--bar/TimeDate.qml8
-rw-r--r--bar/Workspace.qml6
-rw-r--r--popups/launcher/components/App.qml16
-rw-r--r--popups/launcher/components/Emoji.qml16
-rw-r--r--popups/launcher/components/Spell.qml15
7 files changed, 50 insertions, 34 deletions
diff --git a/bar/Network.qml b/bar/Network.qml
index a343977..fbd1d91 100644
--- a/bar/Network.qml
+++ b/bar/Network.qml
@@ -111,10 +111,12 @@ Item {
}
}
}
- MouseArea {
- anchors.fill: container
+
+ HoverHandler {
cursorShape: Qt.PointingHandCursor
- onClicked: {
+ }
+ TapHandler {
+ onTapped: {
root.isCollapsed = !root.isCollapsed;
}
}
diff --git a/bar/Power.qml b/bar/Power.qml
index a29bc4a..02da1f1 100644
--- a/bar/Power.qml
+++ b/bar/Power.qml
@@ -110,14 +110,13 @@ Item {
}
}
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- onEntered: {
- root.collapsed = false;
- }
- onExited: {
- root.collapsed = true;
+ HoverHandler {
+ onHoveredChanged: {
+ if (!hovered) {
+ root.collapsed = true;
+ } else {
+ root.collapsed = false;
+ }
}
}
}
diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml
index 2716e6d..68a5a52 100644
--- a/bar/TimeDate.qml
+++ b/bar/TimeDate.qml
@@ -123,10 +123,12 @@ Item {
}
}
}
- MouseArea {
- anchors.fill: parent
+
+ HoverHandler {
cursorShape: Qt.PointingHandCursor
- onPressed: {
+ }
+ TapHandler {
+ onTapped: {
root.isAlt = !root.isAlt;
}
}
diff --git a/bar/Workspace.qml b/bar/Workspace.qml
index 3120199..662b9e2 100644
--- a/bar/Workspace.qml
+++ b/bar/Workspace.qml
@@ -236,12 +236,12 @@ Item {
if (activeIndex + 1 < Bar.wss)
Hyprland.dispatch(`hl.dsp.focus({ workspace = '+1' })`);
else
- Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`);
+ Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`);
} else if (event.angleDelta.y > 0) {
if (activeIndex + 1 > 1) {
- Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`);
+ Hyprland.dispatch(`hl.dsp.focus({ workspace = '1' })`);
} else if (Bar.wss > 1) {
- Hyprland.dispatch(`hl.dsp.focus({ workspace = '${Bar.wss}' })`);
+ Hyprland.dispatch(`hl.dsp.focus({ workspace = '${Bar.wss}' })`);
}
}
}
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();
}
}