aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/appearance/WallEngineTab.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-29 17:13:53 +0100
committerDanilo M. <danix@danix.xyz>2026-10-29 17:13:53 +0100
commit670452de94e0f3e0bf5719acec28a9b02e929642 (patch)
treea892d0b99b0f5e14eae03e77580118d301078766 /desktop/modules/appearance/WallEngineTab.qml
parent68ee0a175acfa3940ed9e19c0e1aad714f799e47 (diff)
downloadquickshell-670452de94e0f3e0bf5719acec28a9b02e929642.tar.gz
quickshell-670452de94e0f3e0bf5719acec28a9b02e929642.zip
wallpaper: engine page commits like the others, Start changes at once
The page was the only settings page without the header's buttons, and it switched the engine from a checkbox beside the interval. Both looked like the engine had been started when it had not: - The minutes field saved on editingFinished, which needs Enter or a focus change. Clicking the checkbox takes neither, so a typed 1 was left at 30 and the first change was half an hour away. - Even at the right interval, the first change waited one full interval, so starting the engine did nothing visible. The interval and the two sources are now a draft in WallEngine, updated on every keystroke, and the header carries the state ("running, next change at hh:mm", "stopped", "unsaved changes") with Reset, Stop and Start, which reads Apply while running. Start commits the draft, sets the homes and changes the wallpapers straight away; Apply commits and restarts the timer. Hearts stay undrafted, written as clicked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/WallEngineTab.qml')
-rw-r--r--desktop/modules/appearance/WallEngineTab.qml28
1 files changed, 15 insertions, 13 deletions
diff --git a/desktop/modules/appearance/WallEngineTab.qml b/desktop/modules/appearance/WallEngineTab.qml
index caa01f4..3f72d83 100644
--- a/desktop/modules/appearance/WallEngineTab.qml
+++ b/desktop/modules/appearance/WallEngineTab.qml
@@ -22,20 +22,21 @@ Item {
Row {
spacing: 8
- Toggle {
+ Text {
anchors.verticalCenter: parent.verticalCenter
- checked: WallEngine.on
- label: "Change the wallpapers every"
- onToggled: WallEngine.setOn(checked)
+ text: "Change the wallpapers every"
+ color: Theme.subtext
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
}
Field {
anchors.verticalCenter: parent.verticalCenter
width: 50
- value: String(WallEngine.cfg.minutes)
- onEdited: {
- WallEngine.setMinutes(Number(value));
- value = String(WallEngine.cfg.minutes);
- }
+ value: String(WallEngine.draftMinutes)
+ // On every keystroke, not on edited: that waits for Enter
+ // or a focus change, and clicking Start takes neither, so a
+ // typed interval was silently left at the old one.
+ onValueChanged: WallEngine.setDraftMinutes(Number(value))
+ onEdited: value = String(WallEngine.draftMinutes)
}
Text {
anchors.verticalCenter: parent.verticalCenter
@@ -54,7 +55,7 @@ Item {
width: col.width
wrapMode: Text.Wrap
text: "Timer changes recolour the desktop and leave GRUB, the homepage and the login screen alone. "
- + "Switching off puts back each screen's home wallpaper, the one last applied by hand, with a full run."
+ + "Stop puts back each screen's home wallpaper, the one last applied by hand, with a full run."
color: Theme.overlay
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
}
@@ -67,7 +68,8 @@ Item {
required property var modelData
readonly property var paths: WallEngine.list(modelData.which)
readonly property string home: modelData.which === "V" ? WallEngine.cfg.homeV : WallEngine.cfg.homeH
- readonly property string folder: WallEngine.folder(modelData.which)
+ // The draft's source: what Start or Apply will use.
+ readonly property string folder: WallEngine.draftFolder(modelData.which)
readonly property var group: Wallpapers.groups.find(g => g.key === folder) ?? null
width: col.width
spacing: 8
@@ -90,7 +92,7 @@ Item {
Tab {
text: "Hearted"
selected: screen.folder === ""
- onClicked: WallEngine.setFolder(screen.modelData.which, "")
+ onClicked: WallEngine.setDraftFolder(screen.modelData.which, "")
}
Repeater {
model: Wallpapers.groups
@@ -98,7 +100,7 @@ Item {
required property var modelData
text: modelData.name
selected: screen.folder === modelData.key
- onClicked: WallEngine.setFolder(screen.modelData.which, modelData.key)
+ onClicked: WallEngine.setDraftFolder(screen.modelData.which, modelData.key)
}
}
}