fix pointer cursor on all click targets - move cursorShape from TapHandler to HoverHandler
This commit is contained in:
parent
a43d0c8dcd
commit
a35f451fc0
16 changed files with 33 additions and 28 deletions
|
|
@ -263,8 +263,10 @@ Column {
|
||||||
font.pixelSize: S.Theme.fontSize + 4
|
font.pixelSize: S.Theme.fontSize + 4
|
||||||
font.family: S.Theme.iconFontFamily
|
font.family: S.Theme.iconFontFamily
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
enabled: root.player?.canGoPrevious ?? false
|
enabled: root.player?.canGoPrevious ?? false
|
||||||
onTapped: root.player.previous()
|
onTapped: root.player.previous()
|
||||||
}
|
}
|
||||||
|
|
@ -276,8 +278,10 @@ Column {
|
||||||
font.pixelSize: S.Theme.fontSize + 8
|
font.pixelSize: S.Theme.fontSize + 8
|
||||||
font.family: S.Theme.iconFontFamily
|
font.family: S.Theme.iconFontFamily
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: root.player?.togglePlaying()
|
onTapped: root.player?.togglePlaying()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -288,8 +292,10 @@ Column {
|
||||||
font.pixelSize: S.Theme.fontSize + 4
|
font.pixelSize: S.Theme.fontSize + 4
|
||||||
font.family: S.Theme.iconFontFamily
|
font.family: S.Theme.iconFontFamily
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
enabled: root.player?.canGoNext ?? false
|
enabled: root.player?.canGoNext ?? false
|
||||||
onTapped: root.player.next()
|
onTapped: root.player.next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,10 @@ Column {
|
||||||
font.pixelSize: S.Theme.fontSize + 2
|
font.pixelSize: S.Theme.fontSize + 2
|
||||||
font.family: S.Theme.iconFontFamily
|
font.family: S.Theme.iconFontFamily
|
||||||
|
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: if (root.sink?.audio)
|
onTapped: if (root.sink?.audio)
|
||||||
root.sink.audio.muted = !root.sink.audio.muted
|
root.sink.audio.muted = !root.sink.audio.muted
|
||||||
}
|
}
|
||||||
|
|
@ -211,8 +213,10 @@ Column {
|
||||||
font.pixelSize: S.Theme.fontSize
|
font.pixelSize: S.Theme.fontSize
|
||||||
font.family: S.Theme.iconFontFamily
|
font.family: S.Theme.iconFontFamily
|
||||||
|
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: if (streamEntry.modelData.audio)
|
onTapped: if (streamEntry.modelData.audio)
|
||||||
streamEntry.modelData.audio.muted = !streamEntry.modelData.audio.muted
|
streamEntry.modelData.audio.muted = !streamEntry.modelData.audio.muted
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ Text {
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onHoveredChanged: {
|
onHoveredChanged: {
|
||||||
root._hovered = hovered;
|
root._hovered = hovered;
|
||||||
if (hovered && root.tooltip !== "") {
|
if (hovered && root.tooltip !== "") {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ Text {
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onHoveredChanged: {
|
onHoveredChanged: {
|
||||||
root._hovered = hovered;
|
root._hovered = hovered;
|
||||||
if (hovered && root.tooltip !== "") {
|
if (hovered && root.tooltip !== "") {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ Row {
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onHoveredChanged: {
|
onHoveredChanged: {
|
||||||
root._hovered = hovered;
|
root._hovered = hovered;
|
||||||
if (hovered && root.tooltip !== "") {
|
if (hovered && root.tooltip !== "") {
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,6 @@ M.BarSection {
|
||||||
font.pixelSize: S.Theme.fontSize + 2
|
font.pixelSize: S.Theme.fontSize + 2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +132,6 @@ M.BarSection {
|
||||||
opacity: root._blinkOpacity
|
opacity: root._blinkOpacity
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ M.BarSection {
|
||||||
color: root.state === "off" ? S.Theme.base04 : root.accentColor
|
color: root.state === "off" ? S.Theme.base04 : root.accentColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: {
|
onTapped: {
|
||||||
M.FlyoutState.visible = false;
|
M.FlyoutState.visible = false;
|
||||||
btLoader.active = true;
|
btLoader.active = true;
|
||||||
|
|
@ -81,7 +80,6 @@ M.BarSection {
|
||||||
label: root.device + (root.batteryPct >= 0 ? " " + root.batteryPct + "%" : "")
|
label: root.device + (root.batteryPct >= 0 ? " " + root.batteryPct + "%" : "")
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: {
|
onTapped: {
|
||||||
M.FlyoutState.visible = false;
|
M.FlyoutState.visible = false;
|
||||||
btLoader.active = true;
|
btLoader.active = true;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ M.BarSection {
|
||||||
icon: "\uF2DB"
|
icon: "\uF2DB"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -61,7 +60,6 @@ M.BarSection {
|
||||||
minText: "99%@9.99"
|
minText: "99%@9.99"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ M.BarSection {
|
||||||
icon: "\uF0C9"
|
icon: "\uF0C9"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +41,6 @@ M.BarSection {
|
||||||
minText: "100%"
|
minText: "100%"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ M.BarSection {
|
||||||
color: root._loadColor(S.SystemStats.gpuUsage)
|
color: root._loadColor(S.SystemStats.gpuUsage)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -53,7 +52,6 @@ M.BarSection {
|
||||||
color: root._loadColor(S.SystemStats.gpuUsage)
|
color: root._loadColor(S.SystemStats.gpuUsage)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,8 +326,10 @@ PanelWindow {
|
||||||
height: 20
|
height: 20
|
||||||
visible: !root.popupMode
|
visible: !root.popupMode
|
||||||
|
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: {
|
||||||
root._pinned = !root._pinned;
|
root._pinned = !root._pinned;
|
||||||
if (!root._pinned && !root.showPanel)
|
if (!root._pinned && !root.showPanel)
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ M.BarSection {
|
||||||
icon: "\uEFC5"
|
icon: "\uEFC5"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +51,6 @@ M.BarSection {
|
||||||
minText: "100%"
|
minText: "100%"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,11 @@ Item {
|
||||||
id: _hover
|
id: _hover
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root.dismissRequested()
|
onTapped: root.dismissRequested()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,10 +117,10 @@ Item {
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: _dismissHover
|
id: _dismissHover
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root.dismissRequested()
|
onTapped: root.dismissRequested()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -140,8 +142,10 @@ Item {
|
||||||
height: _textCol.implicitHeight
|
height: _textCol.implicitHeight
|
||||||
implicitHeight: _textCol.implicitHeight
|
implicitHeight: _textCol.implicitHeight
|
||||||
|
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: root.notif?.actions?.some(a => a.identifier === "default") ? Qt.PointingHandCursor : undefined
|
cursorShape: root.notif?.actions?.some(a => a.identifier === "default") ? Qt.PointingHandCursor : undefined
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: {
|
||||||
const def = root.notif?.actions?.find(a => a.identifier === "default");
|
const def = root.notif?.actions?.find(a => a.identifier === "default");
|
||||||
if (def) {
|
if (def) {
|
||||||
|
|
@ -260,10 +264,10 @@ Item {
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: _actHover
|
id: _actHover
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: {
|
onTapped: {
|
||||||
parent.modelData.invoke();
|
parent.modelData.invoke();
|
||||||
if (root.dismissOnAction)
|
if (root.dismissOnAction)
|
||||||
|
|
|
||||||
|
|
@ -312,8 +312,10 @@ M.HoverPanel {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: 28
|
height: 28
|
||||||
|
|
||||||
TapHandler {
|
HoverHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
TapHandler {
|
||||||
onTapped: menuWindow._toggleCollapse(notifDelegate.modelData.appName)
|
onTapped: menuWindow._toggleCollapse(notifDelegate.modelData.appName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -388,10 +390,10 @@ M.HoverPanel {
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: _groupDismissHover
|
id: _groupDismissHover
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: {
|
onTapped: {
|
||||||
if (notifDelegate._type === "header")
|
if (notifDelegate._type === "header")
|
||||||
menuWindow._cascadeGroupDismiss(notifDelegate.modelData.appName);
|
menuWindow._cascadeGroupDismiss(notifDelegate.modelData.appName);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ M.BarSection {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: {
|
onTapped: {
|
||||||
centerLoader.active = !centerLoader.active;
|
centerLoader.active = !centerLoader.active;
|
||||||
M.FlyoutState.visible = false;
|
M.FlyoutState.visible = false;
|
||||||
|
|
@ -78,7 +77,6 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: M.NotifService.toggleDnd()
|
onTapped: M.NotifService.toggleDnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ M.BarSection {
|
||||||
color: root._stateColor
|
color: root._stateColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -62,7 +61,6 @@ M.BarSection {
|
||||||
color: root._stateColor
|
color: root._stateColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._pinned = !root._pinned
|
onTapped: root._pinned = !root._pinned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue