launcher: focused wallpaper shadow
This commit is contained in:
parent
be269582da
commit
53f14b3ca2
2 changed files with 36 additions and 15 deletions
|
|
@ -12,10 +12,10 @@ StyledRect {
|
||||||
|
|
||||||
scale: PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0
|
scale: PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0
|
||||||
opacity: PathView.onPath ? 1 : 0
|
opacity: PathView.onPath ? 1 : 0
|
||||||
z: PathView.isCurrentItem ? 1 : 0
|
z: PathView.z
|
||||||
|
|
||||||
implicitWidth: image.width + Appearance.padding.larger * 2
|
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 {
|
StateLayer {
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
|
|
@ -29,7 +29,7 @@ StyledRect {
|
||||||
id: image
|
id: image
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: Appearance.padding.normal
|
y: Appearance.padding.large
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
path: root.modelData.path
|
path: root.modelData.path
|
||||||
|
|
@ -45,11 +45,22 @@ StyledRect {
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
visible: false
|
visible: false
|
||||||
anchors.fill: image
|
anchors.fill: image
|
||||||
width: image.width
|
|
||||||
height: image.height
|
|
||||||
radius: Appearance.rounding.normal
|
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 {
|
MultiEffect {
|
||||||
anchors.fill: image
|
anchors.fill: image
|
||||||
source: image
|
source: image
|
||||||
|
|
@ -73,18 +84,16 @@ StyledRect {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
NumberAnimation {
|
Anim {}
|
||||||
duration: Appearance.anim.durations.normal
|
|
||||||
easing.type: Easing.BezierSpline
|
|
||||||
easing.bezierCurve: Appearance.anim.curves.standard
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
|
component Anim: NumberAnimation {
|
||||||
duration: Appearance.anim.durations.normal
|
duration: Appearance.anim.durations.normal
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
easing.bezierCurve: Appearance.anim.curves.standard
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,18 @@ PathView {
|
||||||
path: Path {
|
path: Path {
|
||||||
startY: root.height / 2
|
startY: root.height / 2
|
||||||
|
|
||||||
|
PathAttribute {
|
||||||
|
name: "z"
|
||||||
|
value: 0
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
x: root.width / 2
|
||||||
|
relativeY: 0
|
||||||
|
}
|
||||||
|
PathAttribute {
|
||||||
|
name: "z"
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
PathLine {
|
PathLine {
|
||||||
x: root.width
|
x: root.width
|
||||||
relativeY: 0
|
relativeY: 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue