diff options
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 } } } |
