From 89d5c958c4c92270b64dfa59ed9fca187e20c801 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 24 Feb 2026 15:22:47 -0500 Subject: [PATCH] settings: use Image in theme colors tab wp preview --- quickshell/Modules/Settings/ThemeColorsTab.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/quickshell/Modules/Settings/ThemeColorsTab.qml b/quickshell/Modules/Settings/ThemeColorsTab.qml index 4bf52146..28b12d55 100644 --- a/quickshell/Modules/Settings/ThemeColorsTab.qml +++ b/quickshell/Modules/Settings/ThemeColorsTab.qml @@ -386,12 +386,22 @@ Item { radius: Theme.cornerRadius color: Theme.surfaceVariant - CachingImage { + Image { anchors.fill: parent anchors.margins: 1 - imagePath: (Theme.wallpaperPath && !Theme.wallpaperPath.startsWith("#")) ? Theme.wallpaperPath : "" + source: { + var wp = Theme.wallpaperPath; + if (!wp || wp === "" || wp.startsWith("#")) + return ""; + if (wp.startsWith("file://")) + wp = wp.substring(7); + return "file://" + wp.split('/').map(s => encodeURIComponent(s)).join('/'); + } fillMode: Image.PreserveAspectCrop visible: Theme.wallpaperPath && !Theme.wallpaperPath.startsWith("#") + sourceSize.width: 120 + sourceSize.height: 120 + asynchronous: true layer.enabled: true layer.effect: MultiEffect { maskEnabled: true