summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 14:19:38 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 14:19:38 +1000
commit9c4821b4b4c298eeaec6c108f435de4cb5fefc16 (patch)
treeacbba6cff7c1550e60db3c6a15ad3f54e8f36979 /modules
parentfeat: launcher wallpaper selector (diff)
downloadcaelestia-shell-9c4821b4b4c298eeaec6c108f435de4cb5fefc16.tar.gz
caelestia-shell-9c4821b4b4c298eeaec6c108f435de4cb5fefc16.tar.bz2
caelestia-shell-9c4821b4b4c298eeaec6c108f435de4cb5fefc16.zip
feat: cache wallpapers
Reduces wallpaper load time massively
Diffstat (limited to 'modules')
-rw-r--r--modules/launcher/WallpaperItem.qml10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml
index bbd611c..c3dd57a 100644
--- a/modules/launcher/WallpaperItem.qml
+++ b/modules/launcher/WallpaperItem.qml
@@ -25,22 +25,18 @@ StyledRect {
}
}
- Image {
+ CachingImage {
id: image
anchors.horizontalCenter: parent.horizontalCenter
y: Appearance.padding.normal
visible: false
- source: `file://${root.modelData.path}`
- asynchronous: true
- fillMode: Image.PreserveAspectCrop
+ path: root.modelData.path
smooth: !root.PathView.view.moving
width: LauncherConfig.sizes.wallpaperWidth
height: width / 16 * 9
- sourceSize.width: width
- sourceSize.height: height
}
Rectangle {
@@ -70,7 +66,7 @@ StyledRect {
renderType: Text.QtRendering
text: root.modelData.name
- font.pointSize: Appearance.font.size.small
+ font.pointSize: Appearance.font.size.normal
}
Behavior on scale {