fix: switch tokens + fast spatial anim
This commit is contained in:
parent
d689338333
commit
0fad2da786
1 changed files with 10 additions and 6 deletions
|
|
@ -21,7 +21,7 @@ Switch {
|
||||||
implicitHeight: Tokens.font.body.medium.pointSize + Tokens.padding.small * 2
|
implicitHeight: Tokens.font.body.medium.pointSize + Tokens.padding.small * 2
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.3 : implicitHeight
|
readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.2 : implicitHeight
|
||||||
|
|
||||||
radius: Tokens.rounding.full
|
radius: Tokens.rounding.full
|
||||||
color: root.checked ? Colours.palette.m3onPrimary : Colours.layer(Colours.palette.m3outline, root.cLayer + 1)
|
color: root.checked ? Colours.palette.m3onPrimary : Colours.layer(Colours.palette.m3outline, root.cLayer + 1)
|
||||||
|
|
@ -85,7 +85,7 @@ Switch {
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: height
|
width: height
|
||||||
height: parent.implicitHeight - Tokens.padding.small
|
height: parent.implicitHeight - Tokens.padding.medium
|
||||||
preferredRendererType: Shape.CurveRenderer
|
preferredRendererType: Shape.CurveRenderer
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
|
|
@ -131,11 +131,15 @@ Switch {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
Anim {}
|
Anim {
|
||||||
|
type: Anim.FastSpatial
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
Anim {}
|
Anim {
|
||||||
|
type: Anim.FastSpatial
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -147,7 +151,7 @@ Switch {
|
||||||
}
|
}
|
||||||
|
|
||||||
component PropAnim: PropertyAnimation {
|
component PropAnim: PropertyAnimation {
|
||||||
duration: Tokens.anim.durations.normal
|
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||||
easing: Tokens.anim.standard
|
easing: Tokens.anim.expressiveFastSpatial
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue