mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
animation: Make fast animations less jolty
Use less steep animation curves to avoid "jolty" behaviour.
This commit is contained in:
parent
a95598d5e4
commit
929cde56db
2 changed files with 6 additions and 6 deletions
|
|
@ -85,28 +85,28 @@ Item {
|
|||
from: background.scale
|
||||
to: 1
|
||||
duration: parallelAnim.animationDuration
|
||||
easing.type: Easing.OutCubic
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScaleAnimator {
|
||||
target: iconParent
|
||||
from: iconParent.scale
|
||||
to: 1
|
||||
duration: parallelAnim.animationDuration
|
||||
easing.type: Easing.OutCubic
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
XAnimator {
|
||||
target: backgroundParent
|
||||
from: backgroundParent.x
|
||||
to: 0
|
||||
duration: parallelAnim.animationDuration
|
||||
easing.type: Easing.OutCubic
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
YAnimator {
|
||||
target: backgroundParent
|
||||
from: backgroundParent.y
|
||||
to: 0
|
||||
duration: parallelAnim.animationDuration
|
||||
easing.type: Easing.OutCubic
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ void HomeScreenState::init()
|
|||
{
|
||||
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]() {
|
||||
// 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]() {
|
||||
// the animation runs too long to connect to QPropertyAnimation::finished
|
||||
|
|
|
|||
Loading…
Reference in a new issue