[effects/minimizeanimation] Use interpolate helper

Summary:
That's not really "clear" what's going on with opacity values. Use
interpolate helper to improve a little bit readability.

Test Plan: Minimized/uniminized System Settings, still works as expected.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14553
This commit is contained in:
Vlad Zagorodniy 2018-08-02 15:26:39 +03:00
parent c36b99cdbc
commit 950bf94f30

View file

@ -93,7 +93,7 @@ void MinimizeAnimationEffect::paintWindow(EffectWindow* w, int mask, QRegion reg
interpolate(1.0, icon.height() / (double)geo.height(), progress));
data.setXTranslation(interpolate(data.xTranslation(), icon.x() - geo.x(), progress));
data.setYTranslation(interpolate(data.yTranslation(), icon.y() - geo.y(), progress));
data.multiplyOpacity(0.1 + (1 - progress) * 0.9);
data.multiplyOpacity(interpolate(1.0, 0.1, progress));
}
// Call the next effect.