[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
This commit is contained in:
parent
94a4675e63
commit
57f313e500
1 changed files with 3 additions and 1 deletions
|
@ -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<int>(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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue