From 53f14b3ca2e7612ab1eec6aaaff2a75d72ce8112 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 4 May 2025 15:11:11 +1000 Subject: launcher: focused wallpaper shadow --- modules/launcher/WallpaperItem.qml | 39 +++++++++++++++++++++++--------------- modules/launcher/WallpaperList.qml | 12 ++++++++++++ 2 files changed, 36 insertions(+), 15 deletions(-) (limited to 'modules') diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml index 19c599f..0cb0200 100644 --- a/modules/launcher/WallpaperItem.qml +++ b/modules/launcher/WallpaperItem.qml @@ -12,10 +12,10 @@ StyledRect { scale: PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0 opacity: PathView.onPath ? 1 : 0 - z: PathView.isCurrentItem ? 1 : 0 + z: PathView.z implicitWidth: image.width + Appearance.padding.larger * 2 - implicitHeight: image.height + label.height + Appearance.spacing.small / 2 + Appearance.padding.normal * 2 + implicitHeight: image.height + label.height + Appearance.spacing.small / 2 + Appearance.padding.large + Appearance.padding.normal StateLayer { radius: Appearance.rounding.normal @@ -29,7 +29,7 @@ StyledRect { id: image anchors.horizontalCenter: parent.horizontalCenter - y: Appearance.padding.normal + y: Appearance.padding.large visible: false path: root.modelData.path @@ -45,11 +45,22 @@ StyledRect { layer.enabled: true visible: false anchors.fill: image - width: image.width - height: image.height radius: Appearance.rounding.normal } + RectangularShadow { + opacity: root.PathView.isCurrentItem ? 0.7 : 0 + anchors.fill: mask + radius: mask.radius + color: Appearance.colours.m3shadow + blur: 10 + spread: 3 + + Behavior on opacity { + Anim {} + } + } + MultiEffect { anchors.fill: image source: image @@ -73,18 +84,16 @@ StyledRect { } Behavior on scale { - NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } + Anim {} } Behavior on opacity { - NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard - } + Anim {} + } + + component Anim: NumberAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard } } diff --git a/modules/launcher/WallpaperList.qml b/modules/launcher/WallpaperList.qml index ecf7976..e3bf2ee 100644 --- a/modules/launcher/WallpaperList.qml +++ b/modules/launcher/WallpaperList.qml @@ -36,6 +36,18 @@ PathView { path: Path { startY: root.height / 2 + PathAttribute { + name: "z" + value: 0 + } + PathLine { + x: root.width / 2 + relativeY: 0 + } + PathAttribute { + name: "z" + value: 1 + } PathLine { x: root.width relativeY: 0 -- cgit v1.2.3-freya