From a35f451fc078e84e81bd8a3e1c002013c4293e9f Mon Sep 17 00:00:00 2001 From: Damocles Date: Fri, 17 Apr 2026 23:54:24 +0200 Subject: [PATCH] fix pointer cursor on all click targets - move cursorShape from TapHandler to HoverHandler --- shell/applets/MprisApplet.qml | 12 +++++++++--- shell/applets/VolumeApplet.qml | 8 ++++++-- shell/modules/BarIcon.qml | 1 + shell/modules/BarLabel.qml | 1 + shell/modules/BarSection.qml | 1 + shell/modules/BatteryModule.qml | 2 -- shell/modules/BluetoothModule.qml | 2 -- shell/modules/CpuModule.qml | 2 -- shell/modules/DiskModule.qml | 2 -- shell/modules/GpuModule.qml | 2 -- shell/modules/HoverPanel.qml | 4 +++- shell/modules/MemoryModule.qml | 2 -- shell/modules/NotifCard.qml | 12 ++++++++---- shell/modules/NotifCenter.qml | 6 ++++-- shell/modules/NotificationsModule.qml | 2 -- shell/modules/TemperatureModule.qml | 2 -- 16 files changed, 33 insertions(+), 28 deletions(-) diff --git a/shell/applets/MprisApplet.qml b/shell/applets/MprisApplet.qml index 264527a..1dd4de6 100644 --- a/shell/applets/MprisApplet.qml +++ b/shell/applets/MprisApplet.qml @@ -263,8 +263,10 @@ Column { font.pixelSize: S.Theme.fontSize + 4 font.family: S.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { enabled: root.player?.canGoPrevious ?? false onTapped: root.player.previous() } @@ -276,8 +278,10 @@ Column { font.pixelSize: S.Theme.fontSize + 8 font.family: S.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { onTapped: root.player?.togglePlaying() } } @@ -288,8 +292,10 @@ Column { font.pixelSize: S.Theme.fontSize + 4 font.family: S.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { enabled: root.player?.canGoNext ?? false onTapped: root.player.next() } diff --git a/shell/applets/VolumeApplet.qml b/shell/applets/VolumeApplet.qml index 4ffde00..739f9d8 100644 --- a/shell/applets/VolumeApplet.qml +++ b/shell/applets/VolumeApplet.qml @@ -30,8 +30,10 @@ Column { font.pixelSize: S.Theme.fontSize + 2 font.family: S.Theme.iconFontFamily - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { onTapped: if (root.sink?.audio) root.sink.audio.muted = !root.sink.audio.muted } @@ -211,8 +213,10 @@ Column { font.pixelSize: S.Theme.fontSize font.family: S.Theme.iconFontFamily - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { onTapped: if (streamEntry.modelData.audio) streamEntry.modelData.audio.muted = !streamEntry.modelData.audio.muted } diff --git a/shell/modules/BarIcon.qml b/shell/modules/BarIcon.qml index d0dfbdc..34e32b4 100644 --- a/shell/modules/BarIcon.qml +++ b/shell/modules/BarIcon.qml @@ -56,6 +56,7 @@ Text { } HoverHandler { + cursorShape: Qt.PointingHandCursor onHoveredChanged: { root._hovered = hovered; if (hovered && root.tooltip !== "") { diff --git a/shell/modules/BarLabel.qml b/shell/modules/BarLabel.qml index bcb2c6a..eba1b8d 100644 --- a/shell/modules/BarLabel.qml +++ b/shell/modules/BarLabel.qml @@ -27,6 +27,7 @@ Text { } HoverHandler { + cursorShape: Qt.PointingHandCursor onHoveredChanged: { root._hovered = hovered; if (hovered && root.tooltip !== "") { diff --git a/shell/modules/BarSection.qml b/shell/modules/BarSection.qml index 6c36c42..bb23e7d 100644 --- a/shell/modules/BarSection.qml +++ b/shell/modules/BarSection.qml @@ -16,6 +16,7 @@ Row { } HoverHandler { + cursorShape: Qt.PointingHandCursor onHoveredChanged: { root._hovered = hovered; if (hovered && root.tooltip !== "") { diff --git a/shell/modules/BatteryModule.qml b/shell/modules/BatteryModule.qml index 53147dc..a1c703a 100644 --- a/shell/modules/BatteryModule.qml +++ b/shell/modules/BatteryModule.qml @@ -122,7 +122,6 @@ M.BarSection { font.pixelSize: S.Theme.fontSize + 2 anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -133,7 +132,6 @@ M.BarSection { opacity: root._blinkOpacity anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } diff --git a/shell/modules/BluetoothModule.qml b/shell/modules/BluetoothModule.qml index 20b09ff..03ecf5c 100644 --- a/shell/modules/BluetoothModule.qml +++ b/shell/modules/BluetoothModule.qml @@ -69,7 +69,6 @@ M.BarSection { color: root.state === "off" ? S.Theme.base04 : root.accentColor anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: { M.FlyoutState.visible = false; btLoader.active = true; @@ -81,7 +80,6 @@ M.BarSection { label: root.device + (root.batteryPct >= 0 ? " " + root.batteryPct + "%" : "") anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: { M.FlyoutState.visible = false; btLoader.active = true; diff --git a/shell/modules/CpuModule.qml b/shell/modules/CpuModule.qml index f969bfe..825be3f 100644 --- a/shell/modules/CpuModule.qml +++ b/shell/modules/CpuModule.qml @@ -52,7 +52,6 @@ M.BarSection { icon: "\uF2DB" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -61,7 +60,6 @@ M.BarSection { minText: "99%@9.99" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } diff --git a/shell/modules/DiskModule.qml b/shell/modules/DiskModule.qml index d4c916c..2bb96e3 100644 --- a/shell/modules/DiskModule.qml +++ b/shell/modules/DiskModule.qml @@ -33,7 +33,6 @@ M.BarSection { icon: "\uF0C9" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -42,7 +41,6 @@ M.BarSection { minText: "100%" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } diff --git a/shell/modules/GpuModule.qml b/shell/modules/GpuModule.qml index b3a7eda..57f854d 100644 --- a/shell/modules/GpuModule.qml +++ b/shell/modules/GpuModule.qml @@ -43,7 +43,6 @@ M.BarSection { color: root._loadColor(S.SystemStats.gpuUsage) anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -53,7 +52,6 @@ M.BarSection { color: root._loadColor(S.SystemStats.gpuUsage) anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } diff --git a/shell/modules/HoverPanel.qml b/shell/modules/HoverPanel.qml index dc6b297..7585fa9 100644 --- a/shell/modules/HoverPanel.qml +++ b/shell/modules/HoverPanel.qml @@ -326,8 +326,10 @@ PanelWindow { height: 20 visible: !root.popupMode - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { onTapped: { root._pinned = !root._pinned; if (!root._pinned && !root.showPanel) diff --git a/shell/modules/MemoryModule.qml b/shell/modules/MemoryModule.qml index cc0383a..64f5eff 100644 --- a/shell/modules/MemoryModule.qml +++ b/shell/modules/MemoryModule.qml @@ -43,7 +43,6 @@ M.BarSection { icon: "\uEFC5" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -52,7 +51,6 @@ M.BarSection { minText: "100%" anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } diff --git a/shell/modules/NotifCard.qml b/shell/modules/NotifCard.qml index 616e68b..df988b7 100644 --- a/shell/modules/NotifCard.qml +++ b/shell/modules/NotifCard.qml @@ -26,9 +26,11 @@ Item { id: _hover } + HoverHandler { + cursorShape: Qt.PointingHandCursor + } TapHandler { acceptedButtons: Qt.RightButton - cursorShape: Qt.PointingHandCursor onTapped: root.dismissRequested() } @@ -115,10 +117,10 @@ Item { HoverHandler { id: _dismissHover + cursorShape: Qt.PointingHandCursor } TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root.dismissRequested() } } @@ -140,8 +142,10 @@ Item { height: _textCol.implicitHeight implicitHeight: _textCol.implicitHeight - TapHandler { + HoverHandler { cursorShape: root.notif?.actions?.some(a => a.identifier === "default") ? Qt.PointingHandCursor : undefined + } + TapHandler { onTapped: { const def = root.notif?.actions?.find(a => a.identifier === "default"); if (def) { @@ -260,10 +264,10 @@ Item { HoverHandler { id: _actHover + cursorShape: Qt.PointingHandCursor } TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: { parent.modelData.invoke(); if (root.dismissOnAction) diff --git a/shell/modules/NotifCenter.qml b/shell/modules/NotifCenter.qml index 3e4c5bd..e49231e 100644 --- a/shell/modules/NotifCenter.qml +++ b/shell/modules/NotifCenter.qml @@ -312,8 +312,10 @@ M.HoverPanel { anchors.top: parent.top height: 28 - TapHandler { + HoverHandler { cursorShape: Qt.PointingHandCursor + } + TapHandler { onTapped: menuWindow._toggleCollapse(notifDelegate.modelData.appName) } } @@ -388,10 +390,10 @@ M.HoverPanel { HoverHandler { id: _groupDismissHover + cursorShape: Qt.PointingHandCursor } TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: { if (notifDelegate._type === "header") menuWindow._cascadeGroupDismiss(notifDelegate.modelData.appName); diff --git a/shell/modules/NotificationsModule.qml b/shell/modules/NotificationsModule.qml index 8adfe1f..4aa19bf 100644 --- a/shell/modules/NotificationsModule.qml +++ b/shell/modules/NotificationsModule.qml @@ -70,7 +70,6 @@ M.BarSection { TapHandler { acceptedButtons: Qt.LeftButton - cursorShape: Qt.PointingHandCursor onTapped: { centerLoader.active = !centerLoader.active; M.FlyoutState.visible = false; @@ -78,7 +77,6 @@ M.BarSection { } TapHandler { acceptedButtons: Qt.RightButton - cursorShape: Qt.PointingHandCursor onTapped: M.NotifService.toggleDnd() } diff --git a/shell/modules/TemperatureModule.qml b/shell/modules/TemperatureModule.qml index 7533e6b..89bd8e5 100644 --- a/shell/modules/TemperatureModule.qml +++ b/shell/modules/TemperatureModule.qml @@ -52,7 +52,6 @@ M.BarSection { color: root._stateColor anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } } @@ -62,7 +61,6 @@ M.BarSection { color: root._stateColor anchors.verticalCenter: parent.verticalCenter TapHandler { - cursorShape: Qt.PointingHandCursor onTapped: root._pinned = !root._pinned } }