From 4c84e4fff3a0243c9c977114584cda44f2173222 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 4 May 2025 16:29:34 +1000 Subject: feat: actually set wallpaper Make launcher wallpaper picker actually work --- modules/launcher/Content.qml | 4 ++-- modules/launcher/WallpaperItem.qml | 4 +++- modules/launcher/WallpaperList.qml | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'modules') 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 -- cgit v1.2.3-freya