summaryrefslogtreecommitdiff
path: root/modules/background/Wallpaper.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-13 23:31:47 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-13 23:31:47 +1000
commit5da1b64da09e4c12bf850750cd1cf18b5bab3210 (patch)
tree4e79285022869d5e30b37e616e10919a187a6c29 /modules/background/Wallpaper.qml
parentdashboard: not full rounding for face (diff)
downloadcaelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.tar.gz
caelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.tar.bz2
caelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.zip
internal: better caching impl
WARNING: causes blocking when caching image on first load
Diffstat (limited to 'modules/background/Wallpaper.qml')
-rw-r--r--modules/background/Wallpaper.qml14
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/background/Wallpaper.qml b/modules/background/Wallpaper.qml
index 2734034..f4e3243 100644
--- a/modules/background/Wallpaper.qml
+++ b/modules/background/Wallpaper.qml
@@ -8,7 +8,7 @@ import QtQuick
Item {
id: root
- property url source: Wallpapers.current ? `file://${Wallpapers.current}` : ""
+ property string source: Wallpapers.current
property Image current: one
anchors.fill: parent
@@ -32,20 +32,14 @@ Item {
id: img
function update(): void {
- const srcPath = `${root.source}`.slice(7);
- if (thumbnail.originalPath === srcPath) {
+ if (path === root.source)
root.current = this;
- } else
- path = srcPath;
+ else
+ path = root.source;
}
anchors.fill: parent
- loadOriginal: true
- asynchronous: true
- cache: false
- fillMode: Image.PreserveAspectCrop
-
opacity: 0
scale: Wallpapers.showPreview ? 1 : 0.8