From d6b407ec372288d377276fc147b0e264be0b5b41 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 12 Jan 2026 09:58:58 -0500 Subject: [PATCH] settings: fix wallpaper preview cache update on per-mode change --- quickshell/Widgets/CachingImage.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickshell/Widgets/CachingImage.qml b/quickshell/Widgets/CachingImage.qml index 95f82191..4d9d983b 100644 --- a/quickshell/Widgets/CachingImage.qml +++ b/quickshell/Widgets/CachingImage.qml @@ -34,7 +34,10 @@ Image { return; } Paths.mkdir(Paths.imagecache); - source = cachePath || encodedImagePath; + const hash = djb2Hash(imagePath); + const cPath = hash ? `${Paths.stringify(Paths.imagecache)}/${hash}@${maxCacheSize}x${maxCacheSize}.png` : ""; + const encoded = "file://" + imagePath.split('/').map(s => encodeURIComponent(s)).join('/'); + source = cPath || encoded; } onStatusChanged: {