summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-05 17:06:12 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-05 17:06:12 +1000
commit97ea9d49929b223036e96388c66d700ea731d6db (patch)
tree74b80e05731e7c14903a253b2d972731584f375f /modules
parentfeat: wallpaper (diff)
downloadcaelestia-shell-97ea9d49929b223036e96388c66d700ea731d6db.tar.gz
caelestia-shell-97ea9d49929b223036e96388c66d700ea731d6db.tar.bz2
caelestia-shell-97ea9d49929b223036e96388c66d700ea731d6db.zip
feat: wallpaper and colour preview
Diffstat (limited to 'modules')
-rw-r--r--modules/background/Wallpaper.qml2
-rw-r--r--modules/launcher/WallpaperList.qml6
2 files changed, 7 insertions, 1 deletions
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