fix pointer cursor on all click targets - move cursorShape from TapHandler to HoverHandler

This commit is contained in:
Damocles 2026-04-17 23:54:24 +02:00
parent a43d0c8dcd
commit a35f451fc0
16 changed files with 33 additions and 28 deletions

View file

@ -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()
}

View file

@ -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
}

View file

@ -56,6 +56,7 @@ Text {
}
HoverHandler {
cursorShape: Qt.PointingHandCursor
onHoveredChanged: {
root._hovered = hovered;
if (hovered && root.tooltip !== "") {

View file

@ -27,6 +27,7 @@ Text {
}
HoverHandler {
cursorShape: Qt.PointingHandCursor
onHoveredChanged: {
root._hovered = hovered;
if (hovered && root.tooltip !== "") {

View file

@ -16,6 +16,7 @@ Row {
}
HoverHandler {
cursorShape: Qt.PointingHandCursor
onHoveredChanged: {
root._hovered = hovered;
if (hovered && root.tooltip !== "") {

View file

@ -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
}
}

View file

@ -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;

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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)

View file

@ -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
}
}

View file

@ -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)

View file

@ -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);

View file

@ -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()
}

View file

@ -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
}
}