sidebar/notifs: better expand icon anim
This commit is contained in:
parent
89d46c1b2f
commit
ab4817abf7
1 changed files with 17 additions and 2 deletions
|
|
@ -198,9 +198,24 @@ StyledRect {
|
|||
|
||||
MaterialIcon {
|
||||
Layout.rightMargin: -Appearance.padding.small / 2
|
||||
animate: true
|
||||
text: root.expanded ? "expand_less" : "expand_more"
|
||||
text: "expand_more"
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : Colours.palette.m3onSurface
|
||||
rotation: root.expanded ? 180 : 0
|
||||
Layout.topMargin: root.expanded ? -Math.floor(Appearance.padding.smaller / 2) : 0
|
||||
|
||||
Behavior on rotation {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on Layout.topMargin {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue