diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-29 17:13:53 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-29 17:13:53 +0100 |
| commit | 670452de94e0f3e0bf5719acec28a9b02e929642 (patch) | |
| tree | a892d0b99b0f5e14eae03e77580118d301078766 /desktop/modules/appearance/WallEngineModule.qml | |
| parent | 68ee0a175acfa3940ed9e19c0e1aad714f799e47 (diff) | |
| download | quickshell-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/WallEngineModule.qml')
| -rw-r--r-- | desktop/modules/appearance/WallEngineModule.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/desktop/modules/appearance/WallEngineModule.qml b/desktop/modules/appearance/WallEngineModule.qml index e907695..5b8a39c 100644 --- a/desktop/modules/appearance/WallEngineModule.qml +++ b/desktop/modules/appearance/WallEngineModule.qml @@ -19,6 +19,7 @@ Module { // nf-fa-shuffle, present in Inconsolata Nerd Font. icon: "\uf074" settings: true + dirty: WallEngine.dirty group: "Appearance" keywords: ["wallpaper", "timer", "rotate", "rotation", "shuffle", "slideshow", "heart"] @@ -30,6 +31,38 @@ Module { page: Component { Page { title: "Wallpaper engine" + // SaveBar's place, not SaveBar: the engine is started and stopped + // here as well as saved, and its state is what the header reports. + actions: Component { + Row { + spacing: 8 + Text { + anchors.verticalCenter: parent.verticalCenter + text: WallEngine.dirty ? "unsaved changes" + : WallEngine.on ? "running, next change at " + + Qt.formatTime(new Date(WallEngine.nextAt), "hh:mm") + : "stopped" + color: WallEngine.dirty ? Theme.yellow : WallEngine.on ? Theme.green : Theme.overlay + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } + } + Button { + visible: WallEngine.dirty + text: "Reset" + onClicked: WallEngine.reset() + } + Button { + visible: WallEngine.on + text: "Stop" + enabled: !Wallpapers.applying + onClicked: WallEngine.stop() + } + Button { + text: WallEngine.on ? "Apply" : "Start" + enabled: (!WallEngine.on || WallEngine.dirty) && !Wallpapers.applying + onClicked: WallEngine.on ? WallEngine.apply() : WallEngine.start() + } + } + } WallEngineTab { width: parent.width } } } |
