diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-06 17:44:16 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-06 17:44:16 +0100 |
| commit | f14d4ac615fe3ae62d77ed828b6150665a687033 (patch) | |
| tree | 1b8be5e1f2b7cce6212cc486215fe34e97ad3e11 /desktop/modules/appearance/Wallpapers.qml | |
| parent | df12ed91675a64afd0b0248d2487e9a94d860830 (diff) | |
| download | quickshell-f14d4ac615fe3ae62d77ed828b6150665a687033.tar.gz quickshell-f14d4ac615fe3ae62d77ed828b6150665a687033.zip | |
wallpaper: play the transition by name
Transitions.next() is asked once per run and the name goes out through
swapping, so both screens play the same effect, and the cover runs it
through WallShader, which the settings page's thumbnails will share.
progress is a plain 0 to 1 for every shader now; burn.frag keeps the
range it was tuned for by remapping it.
newImg gains a layer so it can be a shader's target: an Image sampled
directly gives the whole picture, not its PreserveAspectCrop crop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/Wallpapers.qml')
| -rw-r--r-- | desktop/modules/appearance/Wallpapers.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop/modules/appearance/Wallpapers.qml b/desktop/modules/appearance/Wallpapers.qml index 582fb22..2b8faf7 100644 --- a/desktop/modules/appearance/Wallpapers.qml +++ b/desktop/modules/appearance/Wallpapers.qml @@ -59,7 +59,7 @@ Singleton { signal applied(bool ok, string message) // Sent before wallp runs, while current still names the old picture, so // WallpaperSpread can cover the swap with it. - signal swapping(string which, string from, string to) + signal swapping(string which, string from, string to, string effect) // Every run's end, Apply's or the engine's. applied is Apply's alone: it // reports to the save bar and closes the window. signal finished(bool ok) @@ -333,8 +333,9 @@ Singleton { applying = true; root.kind = kind; let covers = 0; - if (h !== "" && currentH !== "" && h !== currentH) { covers++; swapping("H", currentH, h); } - if (v !== "" && currentV !== "" && v !== currentV) { covers++; swapping("V", currentV, v); } + const effect = Transitions.next(); + if (h !== "" && currentH !== "" && h !== currentH) { covers++; swapping("H", currentH, h, effect); } + if (v !== "" && currentV !== "" && v !== currentV) { covers++; swapping("V", currentV, v, effect); } const args = []; if (h !== "") args.push(`H=${JSON.stringify(h)}`); if (v !== "") args.push(`V=${JSON.stringify(v)}`); @@ -349,7 +350,7 @@ Singleton { // Covers still to come up before wallp may swap swaybg under them. The // cover decodes its pictures asynchronously, and starting wallp with // swapping showed the new picture through the still empty cover for a - // moment, then the old one over it, then the burn. WallpaperSpread + // moment, then the old one over it, then the transition. WallpaperSpread // calls covered() once it is drawing; a cover that never comes (a // screen missing, a picture that fails to load) is waited out. property int uncovered: 0 |
