Wallpaper refining (#81)

* Wallpaper refining

- Swww: allow all images formats supported by Swww but only show the one
we can render in the panel
- Fix: timer should be restarted when selecting a wallpaper
- Fix: avoid recomputing selected thumbnail by altering the border width
- Removed LazyLoader as it was not helping

* Wallpapers changes

- revert: maintaining a single list all wallpapers, support only basic
images format.
- settings: reordered wallpapers settings and made the Swww settings
conditionals to activating the useSWWW toggle

* Fix broken avatar display in Panel, Settings and LockScreen

---------

Co-authored-by: Sébastien Atoch <sebastien@atracktiv.com>
This commit is contained in:
Quadbyte 2025-08-03 15:37:13 -04:00 committed by GitHub
parent e71fecb521
commit de94d94265
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 228 additions and 143 deletions

View file

@ -15,7 +15,7 @@ Singleton {
toggleRandomWallpaper();
}
}
property string wallpaperDirectory: Settings.settings.wallpaperFolder
property var wallpaperList: []
property string currentWallpaper: Settings.settings.currentWallpaper
property bool scanning: false
@ -46,6 +46,11 @@ Singleton {
}
changeWallpaperProcess.running = true;
}
if (randomWallpaperTimer.running) {
randomWallpaperTimer.restart();
}
generateTheme();
}
@ -91,15 +96,17 @@ Singleton {
FolderListModel {
id: folderModel
nameFilters: Settings.settings.useSWWW ? ["*.avif", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.tga", "*.tiff", "*.webp", "*.bmp", "*.farbfeld"] : ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"]
// Swww supports many images format but Quickshell only support a subset of those.
nameFilters: ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"]
showDirs: false
sortField: FolderListModel.Name
onStatusChanged: {
if (status === FolderListModel.Ready) {
var files = [];
var filesSwww = [];
for (var i = 0; i < count; i++) {
var fileph = (Settings.settings.wallpaperFolder !== undefined ? Settings.settings.wallpaperFolder : "") + "/" + get(i, "fileName");
files.push(fileph);
var filepath = (Settings.settings.wallpaperFolder !== undefined ? Settings.settings.wallpaperFolder : "") + "/" + get(i, "fileName");
files.push(filepath);
}
wallpaperList = files;
scanning = false;