[effects/minimizeanimation] Fix coding style
Summary: This change doesn't add new features or bugfixes, it only makes code look uniform. Test Plan: Still compiles. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14608
This commit is contained in:
parent
ce9965ccad
commit
92880381b8
2 changed files with 14 additions and 11 deletions
|
@ -46,7 +46,7 @@ bool MinimizeAnimationEffect::supported()
|
||||||
return effects->animationsSupported();
|
return effects->animationsSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinimizeAnimationEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
void MinimizeAnimationEffect::prePaintScreen(ScreenPrePaintData &data, int time)
|
||||||
{
|
{
|
||||||
const std::chrono::milliseconds delta(time);
|
const std::chrono::milliseconds delta(time);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void MinimizeAnimationEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
effects->prePaintScreen(data, time);
|
effects->prePaintScreen(data, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinimizeAnimationEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time)
|
void MinimizeAnimationEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time)
|
||||||
{
|
{
|
||||||
// Schedule window for transformation if the animation is still in
|
// Schedule window for transformation if the animation is still in
|
||||||
// progress
|
// progress
|
||||||
|
@ -76,7 +76,7 @@ void MinimizeAnimationEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData
|
||||||
effects->prePaintWindow(w, data, time);
|
effects->prePaintWindow(w, data, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinimizeAnimationEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
void MinimizeAnimationEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
const auto animationIt = m_animations.constFind(w);
|
const auto animationIt = m_animations.constFind(w);
|
||||||
if (animationIt != m_animations.constEnd()) {
|
if (animationIt != m_animations.constEnd()) {
|
||||||
|
@ -86,8 +86,9 @@ void MinimizeAnimationEffect::paintWindow(EffectWindow* w, int mask, QRegion reg
|
||||||
QRect geo = w->geometry();
|
QRect geo = w->geometry();
|
||||||
QRect icon = w->iconGeometry();
|
QRect icon = w->iconGeometry();
|
||||||
// If there's no icon geometry, minimize to the center of the screen
|
// If there's no icon geometry, minimize to the center of the screen
|
||||||
if (!icon.isValid())
|
if (!icon.isValid()) {
|
||||||
icon = QRect(effects->virtualScreenGeometry().center(), QSize(0, 0));
|
icon = QRect(effects->virtualScreenGeometry().center(), QSize(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
data *= QVector2D(interpolate(1.0, icon.width() / (double)geo.width(), progress),
|
data *= QVector2D(interpolate(1.0, icon.width() / (double)geo.width(), progress),
|
||||||
interpolate(1.0, icon.height() / (double)geo.height(), progress));
|
interpolate(1.0, icon.height() / (double)geo.height(), progress));
|
||||||
|
@ -124,8 +125,9 @@ void MinimizeAnimationEffect::windowDeleted(EffectWindow *w)
|
||||||
|
|
||||||
void MinimizeAnimationEffect::windowMinimized(EffectWindow *w)
|
void MinimizeAnimationEffect::windowMinimized(EffectWindow *w)
|
||||||
{
|
{
|
||||||
if (effects->activeFullScreenEffect())
|
if (effects->activeFullScreenEffect()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TimeLine &timeLine = m_animations[w];
|
TimeLine &timeLine = m_animations[w];
|
||||||
|
|
||||||
|
@ -142,8 +144,9 @@ void MinimizeAnimationEffect::windowMinimized(EffectWindow *w)
|
||||||
|
|
||||||
void MinimizeAnimationEffect::windowUnminimized(EffectWindow *w)
|
void MinimizeAnimationEffect::windowUnminimized(EffectWindow *w)
|
||||||
{
|
{
|
||||||
if (effects->activeFullScreenEffect())
|
if (effects->activeFullScreenEffect()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TimeLine &timeLine = m_animations[w];
|
TimeLine &timeLine = m_animations[w];
|
||||||
|
|
||||||
|
|
|
@ -30,18 +30,18 @@ namespace KWin
|
||||||
/**
|
/**
|
||||||
* Animates minimize/unminimize
|
* Animates minimize/unminimize
|
||||||
**/
|
**/
|
||||||
class MinimizeAnimationEffect
|
class MinimizeAnimationEffect : public Effect
|
||||||
: public Effect
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MinimizeAnimationEffect();
|
MinimizeAnimationEffect();
|
||||||
|
|
||||||
void reconfigure(ReconfigureFlags flags) override;
|
void reconfigure(ReconfigureFlags flags) override;
|
||||||
|
|
||||||
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
|
virtual void prePaintScreen(ScreenPrePaintData &data, int time);
|
||||||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
virtual void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time);
|
||||||
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
|
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
|
||||||
virtual void postPaintScreen();
|
virtual void postPaintScreen();
|
||||||
virtual bool isActive() const;
|
virtual bool isActive() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue