animation: Make fast animations less jolty

Use less steep animation curves to avoid "jolty" behaviour.
This commit is contained in:
Devin Lin 2025-09-14 08:07:52 -04:00
parent a95598d5e4
commit 929cde56db
2 changed files with 6 additions and 6 deletions

View file

@ -85,28 +85,28 @@ Item {
from: background.scale from: background.scale
to: 1 to: 1
duration: parallelAnim.animationDuration duration: parallelAnim.animationDuration
easing.type: Easing.OutCubic easing.type: Easing.InOutQuad
} }
ScaleAnimator { ScaleAnimator {
target: iconParent target: iconParent
from: iconParent.scale from: iconParent.scale
to: 1 to: 1
duration: parallelAnim.animationDuration duration: parallelAnim.animationDuration
easing.type: Easing.OutCubic easing.type: Easing.InOutQuad
} }
XAnimator { XAnimator {
target: backgroundParent target: backgroundParent
from: backgroundParent.x from: backgroundParent.x
to: 0 to: 0
duration: parallelAnim.animationDuration duration: parallelAnim.animationDuration
easing.type: Easing.OutCubic easing.type: Easing.InOutQuad
} }
YAnimator { YAnimator {
target: backgroundParent target: backgroundParent
from: backgroundParent.y from: backgroundParent.y
to: 0 to: 0
duration: parallelAnim.animationDuration duration: parallelAnim.animationDuration
easing.type: Easing.OutCubic easing.type: Easing.InOutQuad
} }
} }

View file

@ -39,7 +39,7 @@ void HomeScreenState::init()
{ {
const int animDuration = 400; // Kirigami.Units.veryLongDuration const int animDuration = 400; // Kirigami.Units.veryLongDuration
m_openAppDrawerAnim = setupAnimation("appDrawerY", animDuration, QEasingCurve::OutExpo, 0); m_openAppDrawerAnim = setupAnimation("appDrawerY", animDuration, QEasingCurve::OutCubic, 0);
connect(m_openAppDrawerAnim, &QPropertyAnimation::valueChanged, this, [this]() { connect(m_openAppDrawerAnim, &QPropertyAnimation::valueChanged, this, [this]() {
// the animation runs too long to connect to QPropertyAnimation::finished // the animation runs too long to connect to QPropertyAnimation::finished
@ -50,7 +50,7 @@ void HomeScreenState::init()
} }
}); });
m_closeAppDrawerAnim = setupAnimation("appDrawerY", animDuration, QEasingCurve::OutExpo, APP_DRAWER_OPEN_DIST); m_closeAppDrawerAnim = setupAnimation("appDrawerY", animDuration, QEasingCurve::OutCubic, APP_DRAWER_OPEN_DIST);
connect(m_closeAppDrawerAnim, &QPropertyAnimation::valueChanged, this, [this]() { connect(m_closeAppDrawerAnim, &QPropertyAnimation::valueChanged, this, [this]() {
// the animation runs too long to connect to QPropertyAnimation::finished // the animation runs too long to connect to QPropertyAnimation::finished