Commit 950bf94f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent c36b99cd
......@@ -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.
......
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