From 97ea9d49929b223036e96388c66d700ea731d6db Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 5 May 2025 17:06:12 +1000 Subject: feat: wallpaper and colour preview --- modules/background/Wallpaper.qml | 2 +- modules/launcher/WallpaperList.qml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/background/Wallpaper.qml b/modules/background/Wallpaper.qml index 80848d5..b126617 100644 --- a/modules/background/Wallpaper.qml +++ b/modules/background/Wallpaper.qml @@ -42,7 +42,7 @@ Item { asynchronous: true fillMode: Image.PreserveAspectCrop opacity: 0 - scale: 0.8 + scale: Wallpapers.showPreview ? 1 : 0.8 onStatusChanged: { if (status === Image.Ready) diff --git a/modules/launcher/WallpaperList.qml b/modules/launcher/WallpaperList.qml index 9582957..430964e 100644 --- a/modules/launcher/WallpaperList.qml +++ b/modules/launcher/WallpaperList.qml @@ -24,6 +24,12 @@ PathView { } Component.onCompleted: currentIndex = Wallpapers.list.findIndex(w => w.path === Wallpapers.current) + Component.onDestruction: Wallpapers.stopPreview() + + onCurrentItemChanged: { + if (currentItem) + Wallpapers.preview(currentItem.modelData.path); + } implicitWidth: Math.min(LauncherConfig.maxWallpapers, count) * (LauncherConfig.sizes.wallpaperWidth * 0.8 + Appearance.padding.larger * 2) pathItemCount: LauncherConfig.maxWallpapers -- cgit v1.2.3-freya