summaryrefslogtreecommitdiff
path: root/modules/launcher
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 16:29:34 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 16:29:34 +1000
commit4c84e4fff3a0243c9c977114584cda44f2173222 (patch)
tree020cf2a25b3fc2a8900d453cd6d7a0a75f7e7632 /modules/launcher
parentlauncher: anim wallpaperitem creation (diff)
downloadcaelestia-shell-4c84e4fff3a0243c9c977114584cda44f2173222.tar.gz
caelestia-shell-4c84e4fff3a0243c9c977114584cda44f2173222.tar.bz2
caelestia-shell-4c84e4fff3a0243c9c977114584cda44f2173222.zip
feat: actually set wallpaper
Make launcher wallpaper picker actually work
Diffstat (limited to 'modules/launcher')
-rw-r--r--modules/launcher/Content.qml4
-rw-r--r--modules/launcher/WallpaperItem.qml4
-rw-r--r--modules/launcher/WallpaperList.qml4
3 files changed, 8 insertions, 4 deletions
diff --git a/modules/launcher/Content.qml b/modules/launcher/Content.qml
index be6be2e..9759abb 100644
--- a/modules/launcher/Content.qml
+++ b/modules/launcher/Content.qml
@@ -70,8 +70,8 @@ Item {
const currentItem = list.currentList?.currentItem;
if (currentItem) {
if (list.showWallpapers) {
- // TODO
- console.log(currentItem.modelData.path);
+ Wallpapers.setWallpaper(currentItem.modelData.path);
+ root.launcher.launcherVisible = false;
} else if (text.startsWith(LauncherConfig.actionPrefix)) {
currentItem.modelData.onClicked(list.currentList);
} else {
diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml
index e21743c..c0b91d4 100644
--- a/modules/launcher/WallpaperItem.qml
+++ b/modules/launcher/WallpaperItem.qml
@@ -9,6 +9,7 @@ StyledRect {
id: root
required property Wallpapers.Wallpaper modelData
+ required property Scope launcher
scale: 0.5
opacity: 0
@@ -26,7 +27,8 @@ StyledRect {
radius: Appearance.rounding.normal
function onClicked(): void {
- console.log("clicked");
+ Wallpapers.setWallpaper(root.modelData.path);
+ root.launcher.launcherVisible = false;
}
}
diff --git a/modules/launcher/WallpaperList.qml b/modules/launcher/WallpaperList.qml
index e3bf2ee..4030739 100644
--- a/modules/launcher/WallpaperList.qml
+++ b/modules/launcher/WallpaperList.qml
@@ -31,7 +31,9 @@ PathView {
highlightRangeMode: PathView.StrictlyEnforceRange
highlightMoveDuration: Appearance.anim.durations.short
- delegate: WallpaperItem {}
+ delegate: WallpaperItem {
+ launcher: root.launcher
+ }
path: Path {
startY: root.height / 2