From 68ee0a175acfa3940ed9e19c0e1aad714f799e47 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 29 Oct 2026 17:06:48 +0100 Subject: wallpaper: a screen can draw from a gallery folder instead of its hearts Every wallpaper in the gallery is wide, so hearting a whole folder one thumbnail at a time is the long way to say "this folder". Each screen now has a source on the engine page: its hearted list, or one gallery folder picked by chip, stored as the Wallpapers.groups key in Prefs (folderH, folderV, "" for the hearts). A folder that has left the gallery gives an empty pool, so that screen is left alone rather than quietly falling back to its hearts. The hearted list stays saved behind a folder source and comes back with the Hearted chip. Switching source needs nothing from the shuffle: draw() already drops bag entries that are no longer in the pool. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/appearance/WallEngineTab.qml | 31 ++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'desktop/modules/appearance/WallEngineTab.qml') diff --git a/desktop/modules/appearance/WallEngineTab.qml b/desktop/modules/appearance/WallEngineTab.qml index 95e2df2..caa01f4 100644 --- a/desktop/modules/appearance/WallEngineTab.qml +++ b/desktop/modules/appearance/WallEngineTab.qml @@ -67,24 +67,51 @@ 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) + readonly property var group: Wallpapers.groups.find(g => g.key === folder) ?? null width: col.width spacing: 8 Text { - text: `${screen.modelData.name}: ${screen.paths.length} hearted` + text: screen.modelData.name + ": " + + (screen.folder === "" ? `${screen.paths.length} hearted` + : screen.group ? `${screen.group.files.length} in ${screen.group.name}` + : "the folder is gone, so this screen stays as it is") + (WallEngine.on && screen.home !== "" ? `, home ${Wallpapers.label(screen.home)}` : "") color: Theme.subtext font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } } + // Where the timer draws from: the hearts, or one gallery + // folder in their place. + Flow { + width: col.width + spacing: 6 + Tab { + text: "Hearted" + selected: screen.folder === "" + onClicked: WallEngine.setFolder(screen.modelData.which, "") + } + Repeater { + model: Wallpapers.groups + Tab { + required property var modelData + text: modelData.name + selected: screen.folder === modelData.key + onClicked: WallEngine.setFolder(screen.modelData.which, modelData.key) + } + } + } + Text { - visible: screen.paths.length === 0 + visible: screen.folder === "" && 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 { + visible: screen.folder === "" width: col.width spacing: 8 -- cgit v1.2.3