background: extensive animated image support
https://github.com/user-attachments/assets/6d5dfccb-be47-4f72-bcfc-2bb47c43a05b
Summary
- Support for animated wallpapers along with caching support.
- Wallpaper picker lazy-loads previews without blocking.
- Preview viewport thumbnails could opt in / out of animation, defaulted to off.
- Playback on / off support, currently pausing playback on lock, and resumes after unlock.
- The related
cliPR is here: https://github.com/caelestia-dots/cli/pull/68
Changes
cachingimagemanager.hpp+cachingimagemanager.cpp+CachingImage.qmlreworked to show cached static frame 0 while animated frames decode.- Because of
CachingImage.qmlchange, gifs are now also supported for.face(profile avatar). See video above when I lock my screen, I am using the same gif as the background, but they are unrelated, and you could use anything you would like for the profile avatar. - If we should guard against it being used for UI icons, let me know.
- Because of
WallpaperList.qmladdition to drive previews off immediately after index changes, scrolling to animated images will show a static preview right away.modules/background/Wallpaper.qml + Background.qmlpopulated with lock scope and gates playback pause/resume upon lock/unlock.
Testing
QT_LOGGING_TO_CONSOLE=1 quickshell -c caelestiawhen I had the logs to launch wallpaper picker, picking the animated wallpaper and set it, then watch the playback pause kick in while locked, and resumed after unlock.- Scrolling through the wallpaper selection viewport without selecting, landing on animated images will immediately kick off the preview (could use more testing).
Known issues:
- Like static images, the caching of the thumbnail sometimes show an empty black rectangle, caching part should receive attention.
@Gitkubikon Sorry! I had just seen that you had a PR open as well. :cry: I was working on this as a small extension for myself which is why I didn't check, and it blew out to be slightly more comprehensive than I thought it was going to be. Would love your feedback on this as well since you have worked on this, and potentially improving on this feature collaboratively.
@Gitkubikon Sorry! I had just seen that you had a PR open as well. :cry: I was working on this as a small extension for myself which is why I didn't check, and it blew out to be slightly more comprehensive than I thought it was going to be. Would love your feedback on this as well since you have worked on this, and potentially improving on this feature collaboratively.
Holy heck - that’s a fantastic PR. I’ll take a closer look later today, but it already seems better than my quick hack, which only worked with GIFs anyway.
does it have game mode support for example when game mode is enabled it pauses the background as a static image?