make switches more bouncy

This commit is contained in:
end-4
2025-10-29 15:59:15 +01:00
parent eb6fca6697
commit e279e4d972
@@ -45,13 +45,25 @@ Switch {
anchors.leftMargin: root.checked ? ((root.pressed || root.down) ? (22 * root.scale) : 24 * root.scale) : ((root.pressed || root.down) ? (2 * root.scale) : 8 * root.scale)
Behavior on anchors.leftMargin {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
NumberAnimation {
duration: Appearance.animationCurves.expressiveFastSpatialDuration
easing.type: Easing.BezierCurve
easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial
}
}
Behavior on width {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
NumberAnimation {
duration: Appearance.animationCurves.expressiveFastSpatialDuration
easing.type: Easing.BezierCurve
easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial
}
}
Behavior on height {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
NumberAnimation {
duration: Appearance.animationCurves.expressiveFastSpatialDuration
easing.type: Easing.BezierCurve
easing.bezierCurve: Appearance.animationCurves.expressiveFastSpatial
}
}
Behavior on color {
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)