diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/launcher/WallpaperItem.qml | 39 | ||||
| -rw-r--r-- | modules/launcher/WallpaperList.qml | 12 |
2 files changed, 36 insertions, 15 deletions
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 |