Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 57f313e5 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent 94a4675e
......@@ -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);
}
......
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