Commit ee5f63c0 authored by Sefa Eyeoglu's avatar Sefa Eyeoglu Committed by Nate Graham
Browse files

[effects/slidingpopups] Tweak effect to make animation smoother and more consistent

Summary:
- Easing function for slide-in changed to InQuad
- Easing function for slide-out changed to OutQuad
- Opacity is now interpolated, too.

Reviewers: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson

Reviewed By: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson

Subscribers: niccolove, ngraham, abetts, davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18000
parent e728460a
......@@ -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::InOutSine);
animation.timeLine.setEasingCurve(QEasingCurve::OutQuad);
// 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,7 +503,8 @@ void SlidingPopupsEffect::slideOut(EffectWindow *w)
animation.kind = AnimationKind::Out;
animation.timeLine.setDirection(TimeLine::Backward);
animation.timeLine.setDuration((*dataIt).slideOutDuration);
animation.timeLine.setEasingCurve(QEasingCurve::InOutSine);
// this is effectively InQuad because the direction is reversed
animation.timeLine.setEasingCurve(QEasingCurve::OutQuad);
// 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
......
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