Commit cc4b62b7 authored by Noah Davis's avatar Noah Davis 🌵
Browse files

[SliderHandle] Adjust x/y animation velocity and color animation

Explicitly use 800 as velocity.

Only animate color when going back to normal.

(cherry picked from commit 3b09b5f0)
parent 42a6d616
......@@ -53,15 +53,22 @@ Rectangle {
color: Kirigami.Theme.backgroundColor
border {
width: Kirigami.Units.smallBorder
color: (root.pressed || root.visualFocus || root.hovered) && control.enabled ?
Kirigami.Theme.focusColor : Kirigami.Theme.separatorColor
color: root.pressed || root.visualFocus || root.hovered ? Kirigami.Theme.focusColor : Kirigami.Theme.separatorColor
}
Behavior on border.color {
enabled: root.pressed || root.visualFocus || root.hovered
ColorAnimation {
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
Behavior on x {
enabled: root.loaded && !Kirigami.Settings.hasTransientTouchInput
SmoothedAnimation {
duration: Kirigami.Units.longDuration
velocity: control.implicitBackgroundWidth*4
velocity: 800
//SmoothedAnimations have a hardcoded InOutQuad easing
}
}
......@@ -69,7 +76,7 @@ Rectangle {
enabled: root.loaded && !Kirigami.Settings.hasTransientTouchInput
SmoothedAnimation {
duration: Kirigami.Units.longDuration
velocity: control.implicitBackgroundHeight*4
velocity: 800
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment