From 950bf94f30a6e9a8f2da8b9799e7b7282bb295af Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 2 Aug 2018 15:26:39 +0300 Subject: [PATCH] [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 --- effects/minimizeanimation/minimizeanimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/minimizeanimation/minimizeanimation.cpp b/effects/minimizeanimation/minimizeanimation.cpp index d22c1f3776..99d1a5d5a9 100644 --- a/effects/minimizeanimation/minimizeanimation.cpp +++ b/effects/minimizeanimation/minimizeanimation.cpp @@ -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.