Commit f9394d83 authored by Niccolò Venerandi's avatar Niccolò Venerandi Committed by Niccolò Venerandi

Move from Quad to Cubic

Summary: See https://invent.kde.org/websites/hig-kde-org/-/merge_requests/70

Reviewers: #kwin, ngraham

Reviewed By: ngraham

Subscribers: ngraham, zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27827
parent 86188389
......@@ -306,7 +306,7 @@ void ScriptedEffectsTest::testAnimations()
QCOMPARE(animationsForWindow[0].timeLine.duration(), 100ms);
QCOMPARE(animationsForWindow[0].to, FPx2(1.4));
QCOMPARE(animationsForWindow[0].attribute, AnimationEffect::Scale);
QCOMPARE(animationsForWindow[0].timeLine.easingCurve().type(), QEasingCurve::OutQuad);
QCOMPARE(animationsForWindow[0].timeLine.easingCurve().type(), QEasingCurve::OutCubic);
QCOMPARE(animationsForWindow[0].terminationFlags,
AnimationEffect::TerminateAtSource | AnimationEffect::TerminateAtTarget);
......
effects.windowAdded.connect(function(w) {
w.anim1 = effect.animate(w, Effect.Scale, 100, 1.4, 0.2, 0, QEasingCurve.OutQuad);
w.anim1 = effect.animate(w, Effect.Scale, 100, 1.4, 0.2, 0, QEasingCurve.OutCubic);
sendTestResponse(typeof(w.anim1) == "number");
});
......
......@@ -5,10 +5,10 @@ effects.windowAdded.connect(function(w) {
animations: [{
type: Effect.Scale,
to: 1.4,
curve: QEasingCurve.OutQuad
curve: QEasingCurve.OutCubic
}, {
type: Effect.Opacity,
curve: QEasingCurve.OutQuad,
curve: QEasingCurve.OutCubic,
to: 0.0
}]
});
......
......@@ -464,7 +464,7 @@ void SlidingPopupsEffect::slideIn(EffectWindow *w)
animation.kind = AnimationKind::In;
animation.timeLine.setDirection(TimeLine::Forward);
animation.timeLine.setDuration((*dataIt).slideInDuration);
animation.timeLine.setEasingCurve(QEasingCurve::OutQuad);
animation.timeLine.setEasingCurve(QEasingCurve::OutCubic);
// If the opposite animation (Out) was active and it had shorter duration,
// at this point, the timeline can end up in the "done" state. Thus, we have
......@@ -503,8 +503,8 @@ void SlidingPopupsEffect::slideOut(EffectWindow *w)
animation.kind = AnimationKind::Out;
animation.timeLine.setDirection(TimeLine::Backward);
animation.timeLine.setDuration((*dataIt).slideOutDuration);
// this is effectively InQuad because the direction is reversed
animation.timeLine.setEasingCurve(QEasingCurve::OutQuad);
// this is effectively InCubic because the direction is reversed
animation.timeLine.setEasingCurve(QEasingCurve::OutCubic);
// If the opposite animation (In) was active and it had shorter duration,
// at this point, the timeline can end up in the "done" state. Thus, we have
......
......@@ -162,7 +162,7 @@ var badBadWindowsEffect = {
w.offToCornerId = set({
window: w,
duration: badBadWindowsEffect.duration,
curve: QEasingCurve.InOutQuad,
curve: QEasingCurve.InOutCubic,
animations: [{
type: Effect.Position,
targetAnchor: anchor,
......@@ -180,7 +180,7 @@ var badBadWindowsEffect = {
animate({
window: w,
duration: badBadWindowsEffect.duration,
curve: QEasingCurve.InOutQuad,
curve: QEasingCurve.InOutCubic,
animations: [{
type: Effect.Position,
sourceAnchor: anchor,
......
......@@ -3684,7 +3684,7 @@ public:
/**
* Sets new easing curve by providing its type.
*
* @param type Type of the easing curve(e.g. QEasingCurve::InQuad, etc)
* @param type Type of the easing curve(e.g. QEasingCurve::InCubic, etc)
* @see easingCurve
* @since 5.14
*/
......
......@@ -210,7 +210,7 @@ void OnScreenNotification::createInputSpy()
m_animation->setStartValue(1.0);
m_animation->setEndValue(0.0);
m_animation->setDuration(250);
m_animation->setEasingCurve(QEasingCurve::InOutQuad);
m_animation->setEasingCurve(QEasingCurve::InOutCubic);
}
}
}
......
......@@ -116,19 +116,19 @@ Window {
}
Behavior on x {
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutQuad; }
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutCubic; }
enabled: window.animationEnabled
}
Behavior on y {
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutQuad; }
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutCubic; }
enabled: window.animationEnabled
}
Behavior on width {
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutQuad; }
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutCubic; }
enabled: window.animationEnabled
}
Behavior on height {
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutQuad; }
NumberAnimation { duration: window.animationDuration; easing.type: Easing.InOutCubic; }
enabled: window.animationEnabled
}
}
......
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