aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/appearance/WallShader.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-06 17:44:16 +0100
committerDanilo M. <danix@danix.xyz>2026-11-06 17:44:16 +0100
commitf14d4ac615fe3ae62d77ed828b6150665a687033 (patch)
tree1b8be5e1f2b7cce6212cc486215fe34e97ad3e11 /desktop/modules/appearance/WallShader.qml
parentdf12ed91675a64afd0b0248d2487e9a94d860830 (diff)
downloadquickshell-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/WallShader.qml')
-rw-r--r--desktop/modules/appearance/WallShader.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/desktop/modules/appearance/WallShader.qml b/desktop/modules/appearance/WallShader.qml
new file mode 100644
index 0000000..19826ac
--- /dev/null
+++ b/desktop/modules/appearance/WallShader.qml
@@ -0,0 +1,27 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// 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
+
+// One transition, by name, for the cover and the settings page's thumbnails.
+// Goes in the old picture's layer.effect, which fills in source. Every shader
+// draws the old picture at progress 0 and the new one at 1, and picks what it
+// needs from these properties. target must be an item with a layer: an Image
+// sampled directly gives the whole picture, not its PreserveAspectCrop crop.
+ShaderEffect {
+ property string name: "burn"
+ property var source
+ property var target
+ property real progress: 0
+ property real aspect: 1
+ property point origin: Qt.point(0.5, 0.5)
+ fragmentShader: Qt.resolvedUrl(name + ".frag.qsb")
+}