aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/appearance/IconsTab.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-17 11:37:12 +0200
committerDanilo M. <danix@danix.xyz>2026-10-17 11:37:12 +0200
commitf73b88072b7abad720923dd32bae6a1e98bf64d5 (patch)
tree2130fda0e99a0f09a2c6ee6030cd785d6d32f8f6 /desktop/modules/appearance/IconsTab.qml
parent080d3d9aaffa8848d6de8546511f096d8e7c30f5 (diff)
downloadquickshell-f73b88072b7abad720923dd32bae6a1e98bf64d5.tar.gz
quickshell-f73b88072b7abad720923dd32bae6a1e98bf64d5.zip
settings: every page commits from the header
The Mail, Assistant and Ask presets pages got a Save and Discard pair in the page header; the rest still had their own buttons wherever their page put them: User's Save at the bottom, Wallpaper's Apply and Reset beside the mock screens, Icons' Apply and Reset under the cursor cards, HyprSunset's and HyprIdle's Save + Restart in the page. They now all sit in the header SaveBar, which takes the page's own verbs (Apply and Reset, Save + Restart) and a busy state. HyprSunset and HyprIdle had no notion of an unsaved change, so their button was always live. They now count as changed when what save() would write differs from what was read, which enables Save only then, gives Discard (a reload) something to drop, and marks them in the sidebar; a window open no longer reloads them over unsaved edits. The staged cursor moved from IconsTab into the Icons singleton so the header and the sidebar can see it. Git and autostart act a row at a time, and a theme applies on click, so those have no bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/IconsTab.qml')
-rw-r--r--desktop/modules/appearance/IconsTab.qml32
1 files changed, 7 insertions, 25 deletions
diff --git a/desktop/modules/appearance/IconsTab.qml b/desktop/modules/appearance/IconsTab.qml
index 777ea51..1df9cb0 100644
--- a/desktop/modules/appearance/IconsTab.qml
+++ b/desktop/modules/appearance/IconsTab.qml
@@ -22,7 +22,6 @@ Item {
// 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 {
id: col
@@ -139,7 +138,7 @@ Item {
required property string modelData
objectName: "cursor:" + modelData
readonly property bool current: Icons.currentCursor === modelData
- readonly property bool staged: pendingCursor === modelData
+ readonly property bool staged: Icons.pendingCursor === modelData
width: 230; height: 150; radius: 10
color: current || staged ? Qt.alpha(Theme.accent, 0.2) : Qt.alpha(Theme.surface, 0.35)
border.width: current || staged ? 2 : 1
@@ -150,7 +149,7 @@ Item {
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
- onClicked: pendingCursor = modelData
+ onClicked: Icons.pendingCursor = modelData
}
Column {
@@ -191,28 +190,11 @@ Item {
}
}
- Row {
- spacing: 8
- Text {
- anchors.verticalCenter: parent.verticalCenter
- text: pendingCursor !== "" ? "click Apply to set" : "click a cursor theme to stage it"
- color: Theme.overlay
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
- }
- Tab {
- text: "Apply"
- selected: pendingCursor !== ""
- enabled: pendingCursor !== ""
- onClicked: {
- Icons.applyCursor(pendingCursor);
- pendingCursor = "";
- }
- }
- Tab {
- text: "Reset"
- enabled: pendingCursor !== ""
- onClicked: pendingCursor = ""
- }
+ // Apply and Reset are in the page header, with every settings page's.
+ Text {
+ text: Icons.pendingCursor !== "" ? "Apply, in the header, sets it" : "click a cursor theme to stage it"
+ color: Theme.overlay
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
}
Text {