From 0505ba8f92545107ecd45d6f3cd8d5cea5d3fd2b Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 4 May 2025 16:17:10 +1000 Subject: launcher: anim wallpaperitem creation Also fix cachingimage --- modules/launcher/WallpaperItem.qml | 9 +++++++-- widgets/CachingImage.qml | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml index c037440..e21743c 100644 --- a/modules/launcher/WallpaperItem.qml +++ b/modules/launcher/WallpaperItem.qml @@ -10,10 +10,15 @@ StyledRect { required property Wallpapers.Wallpaper modelData - scale: PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0 - opacity: PathView.onPath ? 1 : 0 + scale: 0.5 + opacity: 0 z: PathView.z + Component.onCompleted: { + scale = Qt.binding(() => PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0); + opacity = Qt.binding(() => PathView.onPath ? 1 : 0); + } + implicitWidth: image.width + Appearance.padding.larger * 2 implicitHeight: image.height + label.height + Appearance.spacing.small / 2 + Appearance.padding.large + Appearance.padding.normal diff --git a/widgets/CachingImage.qml b/widgets/CachingImage.qml index cff5676..692a090 100644 --- a/widgets/CachingImage.qml +++ b/widgets/CachingImage.qml @@ -8,7 +8,12 @@ Image { required property string path property string thumbnail: path - source: `file://${thumbnail}` + source: { + if (thumbnail) + return `file://${thumbnail}`; + shaProc.running = true; + return ""; + } asynchronous: true fillMode: Image.PreserveAspectCrop -- cgit v1.2.3-freya