summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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