From b38afe9d9ef0361ed2b99ba51363ade2e70e72f9 Mon Sep 17 00:00:00 2001 From: xdenotte Date: Thu, 21 Aug 2025 00:02:11 +0200 Subject: [PATCH] Fix Wallpaper preview --- Modals/FileBrowserModal.qml | 5 ++--- Modules/Settings/PersonalizationTab.qml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Modals/FileBrowserModal.qml b/Modals/FileBrowserModal.qml index a02e2185..c8d21ba6 100644 --- a/Modals/FileBrowserModal.qml +++ b/Modals/FileBrowserModal.qml @@ -240,10 +240,9 @@ DankModal { CachingImage { anchors.fill: parent - imagePath: !delegateRoot.fileIsDir ? delegateRoot.filePath : "" + source: (!delegateRoot.fileIsDir && isImageFile(delegateRoot.fileName)) ? ("file://" + delegateRoot.filePath) : "" fillMode: Image.PreserveAspectCrop - visible: !delegateRoot.fileIsDir && isImageFile( - delegateRoot.fileName) + visible: !delegateRoot.fileIsDir && isImageFile(delegateRoot.fileName) maxCacheSize: 80 } diff --git a/Modules/Settings/PersonalizationTab.qml b/Modules/Settings/PersonalizationTab.qml index 65ee089a..e9498102 100644 --- a/Modules/Settings/PersonalizationTab.qml +++ b/Modules/Settings/PersonalizationTab.qml @@ -155,7 +155,7 @@ Item { CachingImage { anchors.fill: parent anchors.margins: 1 - imagePath: SessionData.wallpaperPath || "" + source: SessionData.wallpaperPath !== "" ? "file://" + SessionData.wallpaperPath : "" fillMode: Image.PreserveAspectCrop visible: SessionData.wallpaperPath !== "" maxCacheSize: 160