From 9c4821b4b4c298eeaec6c108f435de4cb5fefc16 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 4 May 2025 14:19:38 +1000 Subject: feat: cache wallpapers Reduces wallpaper load time massively --- modules/launcher/WallpaperItem.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'modules') 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 { -- cgit v1.2.3-freya