// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import QtQuick import "../.." Item { implicitHeight: col.implicitHeight Column { id: col width: parent.width spacing: 14 Row { spacing: 8 Toggle { anchors.verticalCenter: parent.verticalCenter checked: WallEngine.on label: "Change the wallpapers every" onToggled: WallEngine.setOn(checked) } Field { anchors.verticalCenter: parent.verticalCenter width: 50 value: String(WallEngine.cfg.minutes) onEdited: { WallEngine.setMinutes(Number(value)); value = String(WallEngine.cfg.minutes); } } Text { anchors.verticalCenter: parent.verticalCenter text: "minutes" color: Theme.subtext font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } } Tab { text: "Next" enabled: WallEngine.on && !Wallpapers.applying onClicked: if (enabled) WallEngine.next() } } Text { 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." color: Theme.overlay font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } } Repeater { model: [{ which: "H", name: "Horizontal, DP-1" }, { which: "V", name: "Vertical, DP-3" }] Column { id: screen 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 width: col.width spacing: 8 Text { text: `${screen.modelData.name}: ${screen.paths.length} hearted` + (WallEngine.on && screen.home !== "" ? `, home ${Wallpapers.label(screen.home)}` : "") color: Theme.subtext font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } } Text { visible: screen.paths.length === 0 text: "Heart a wallpaper on the Wallpaper page, with this screen selected, to add it." color: Theme.overlay font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } } Flow { width: col.width spacing: 8 Repeater { model: screen.paths // Dimmed when the gallery's scan did not find it: the // timer skips it. Rectangle { id: entry required property string modelData width: 192; height: 108 + 20 radius: 6 color: Qt.alpha(Theme.surface, 0.3) opacity: WallEngine.present(modelData) ? 1 : 0.4 clip: true Image { id: thumb anchors { top: parent.top; left: parent.left; right: parent.right; margins: 4 } height: 100 source: "file://" + entry.modelData asynchronous: true cache: false fillMode: Image.PreserveAspectCrop sourceSize.width: 192 } Text { anchors { top: thumb.bottom; left: parent.left; right: parent.right; margins: 4 } elide: Text.ElideMiddle text: Wallpapers.label(entry.modelData) color: Theme.subtext font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 6 } } // nf-fa-xmark: out of the list. Text { anchors { top: parent.top; right: parent.right; margins: 8 } text: "\uf00d" color: Theme.text style: Text.Outline styleColor: Qt.alpha(Theme.base, 0.6) font { family: Theme.iconFamily; pixelSize: Theme.fontSize } MouseArea { anchors { fill: parent; margins: -4 } cursorShape: Qt.PointingHandCursor onClicked: WallEngine.toggle(entry.modelData, screen.modelData.which) } } } } } } } } }