diff options
Diffstat (limited to 'appearance/IconsTab.qml')
| -rw-r--r-- | appearance/IconsTab.qml | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/appearance/IconsTab.qml b/appearance/IconsTab.qml index 908a003..c4d82ca 100644 --- a/appearance/IconsTab.qml +++ b/appearance/IconsTab.qml @@ -17,10 +17,11 @@ Flickable { contentHeight: col.implicitHeight clip: true - property string liveCursorCursor: "" - // Clicking a cursor card stages it; Apply commits. The hover preview above - // switches the real cursor and reverts, so staging must not be confused - // with it: pendingCursor survives unhover, liveCursorCursor does not. + // Clicking a cursor card stages it; Apply commits. There is deliberately no + // live hover preview: hyprctl setcursor is not a read-only switch, Hyprland + // persists the theme to org.gnome.desktop.interface cursor-theme, so + // hovering wrote the setting and a close left the last hovered theme set. + // The four rendered shapes on each card are the preview. property string pendingCursor: "" Column { @@ -143,21 +144,6 @@ Flickable { : current ? Qt.alpha(Theme.accent, 0.5) : "transparent" - HoverHandler { - onHoveredChanged: { - if (hovered) { - // Previews are already batched on open; hovering - // only switches the real cursor and reverts it. - liveCursorCursor = modelData; - Quickshell.execDetached(["hyprctl", "setcursor", modelData, - String(Icons.cursorSize)]); - } else if (liveCursorCursor === modelData) { - liveCursorCursor = ""; - Quickshell.execDetached(["hyprctl", "setcursor", Icons.currentCursor, - String(Icons.cursorSize)]); - } - } - } MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor @@ -215,9 +201,6 @@ Flickable { selected: pendingCursor !== "" enabled: pendingCursor !== "" onClicked: { - // The hover revert would otherwise fire on the way out and - // set the old theme back over the one just applied. - liveCursorCursor = ""; Icons.applyCursor(pendingCursor); pendingCursor = ""; } @@ -239,15 +222,4 @@ Flickable { } } - onVisibleChanged: if (!visible && liveCursorCursor !== "") { - Quickshell.execDetached(["hyprctl", "setcursor", Icons.currentCursor, String(Icons.cursorSize)]); - liveCursorCursor = ""; - } - - // A Loader destroys this item on tab switch or drawer close, and visible - // does not necessarily change first, so revert the real cursor here too. - Component.onDestruction: if (liveCursorCursor !== "") { - Quickshell.execDetached(["hyprctl", "setcursor", Icons.currentCursor, String(Icons.cursorSize)]); - liveCursorCursor = ""; - } } |
