From 57f313e5003aeeea4b5034e62a7463d4f70b9975 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sun, 21 Oct 2018 19:46:51 +0300 Subject: [PATCH] [effects/sheet] Decrease the default animation duration Summary: For some historical reasons, the sheet effect uses animation duration of 500ms. In comparison to other effects that animate the appearing and the disappearing of windows, 500ms is too high value for the duration. As the title says, this change decreases the default animation duration to 300ms. The new duration is more saner. The opacity is animated to make the effect look smoother with the shorter animation duration. BUG: 400021 FIXED-IN: 5.15.0 Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16359 --- effects/sheet/sheet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/effects/sheet/sheet.cpp b/effects/sheet/sheet.cpp index eea71981b6..fcf9e30ddf 100644 --- a/effects/sheet/sheet.cpp +++ b/effects/sheet/sheet.cpp @@ -51,7 +51,7 @@ void SheetEffect::reconfigure(ReconfigureFlags flags) // TODO: Rename AnimationTime config key to Duration. const int d = animationTime(SheetConfig::animationTime() != 0 ? SheetConfig::animationTime() - : 500); + : 300); m_duration = std::chrono::milliseconds(static_cast(d)); } @@ -113,6 +113,8 @@ void SheetEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowP data *= QVector3D(1.0, t, t); data.translate(0.0, -interpolate(w->y() - (*animationIt).parentY, 0.0, t)); + data.multiplyOpacity(t); + effects->paintWindow(w, mask, region, data); }