summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-05 19:06:32 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-05 19:06:32 +1000
commit1a650b73bc75a7b617d9e0c24d680eae47218f3d (patch)
tree33d7d5d76733bff274eda57fe7b3f93f7534f7c6 /modules
parentwallpaper: limit source size (diff)
downloadcaelestia-shell-1a650b73bc75a7b617d9e0c24d680eae47218f3d.tar.gz
caelestia-shell-1a650b73bc75a7b617d9e0c24d680eae47218f3d.tar.bz2
caelestia-shell-1a650b73bc75a7b617d9e0c24d680eae47218f3d.zip
thumbnailer: better caching
Diffstat (limited to 'modules')
-rw-r--r--modules/background/Wallpaper.qml14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/background/Wallpaper.qml b/modules/background/Wallpaper.qml
index 2ffc922..78624d5 100644
--- a/modules/background/Wallpaper.qml
+++ b/modules/background/Wallpaper.qml
@@ -28,23 +28,25 @@ Item {
id: two
}
- component Img: Image {
+ component Img: CachingImage {
id: img
function update(): void {
- if (source === root.source)
+ const srcPath = `${root.source}`.slice(7);
+ if (thumbnail.originalPath === srcPath) {
root.current = this;
- else
- source = root.source;
+ } else
+ path = srcPath;
}
anchors.fill: parent
+
asynchronous: true
+ cache: false
fillMode: Image.PreserveAspectCrop
+
opacity: 0
scale: Wallpapers.showPreview ? 1 : 0.8
- sourceSize.width: width
- sourceSize.height: height
onStatusChanged: {
if (status === Image.Ready)