Merge branch 'Plasma/5.12'
This commit is contained in:
commit
a5a661211c
3 changed files with 18 additions and 14 deletions
|
@ -105,19 +105,23 @@ void KscreenEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data, in
|
|||
|
||||
void KscreenEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
||||
{
|
||||
//fade to black and fully opaque
|
||||
switch (m_state) {
|
||||
case StateFadingOut:
|
||||
data.multiplyOpacity(1.0 - m_timeLine.currentValue());
|
||||
break;
|
||||
case StateFadedOut:
|
||||
data.multiplyOpacity(0.0);
|
||||
break;
|
||||
case StateFadingIn:
|
||||
data.multiplyOpacity(m_timeLine.currentValue());
|
||||
break;
|
||||
default:
|
||||
// no adjustment
|
||||
break;
|
||||
case StateFadingOut:
|
||||
data.setOpacity(data.opacity() + (1.0 - data.opacity()) * m_timeLine.currentValue());
|
||||
data.multiplyBrightness(1.0 - m_timeLine.currentValue());
|
||||
break;
|
||||
case StateFadedOut:
|
||||
data.multiplyOpacity(0.0);
|
||||
data.multiplyBrightness(0.0);
|
||||
break;
|
||||
case StateFadingIn:
|
||||
data.setOpacity(data.opacity() + (1.0 - data.opacity()) * (1.0 - m_timeLine.currentValue()));
|
||||
data.multiplyBrightness(m_timeLine.currentValue());
|
||||
break;
|
||||
default:
|
||||
// no adjustment
|
||||
break;
|
||||
}
|
||||
effects->paintWindow(w, mask, region, data);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/********************************************************************
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
|
||||
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/********************************************************************
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
|
||||
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
|
||||
Copyright (C) 2016 Marco Martin <mart@kde.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
Loading…
Reference in a new issue