summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 15:11:11 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-04 15:11:11 +1000
commit53f14b3ca2e7612ab1eec6aaaff2a75d72ce8112 (patch)
tree1b2a1e52c2a2835b8c07e97e18a088242f46986a
parentlauncher: elide wallpaper names (diff)
downloadcaelestia-shell-53f14b3ca2e7612ab1eec6aaaff2a75d72ce8112.tar.gz
caelestia-shell-53f14b3ca2e7612ab1eec6aaaff2a75d72ce8112.tar.bz2
caelestia-shell-53f14b3ca2e7612ab1eec6aaaff2a75d72ce8112.zip
launcher: focused wallpaper shadow
-rw-r--r--modules/launcher/WallpaperItem.qml39
-rw-r--r--modules/launcher/WallpaperList.qml12
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