Merge branch 'Plasma/5.12'
commit
a5a661211c
|
@ -105,19 +105,23 @@ void KscreenEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data, in
|
||||||
|
|
||||||
void KscreenEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
void KscreenEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
|
//fade to black and fully opaque
|
||||||
switch (m_state) {
|
switch (m_state) {
|
||||||
case StateFadingOut:
|
case StateFadingOut:
|
||||||
data.multiplyOpacity(1.0 - m_timeLine.currentValue());
|
data.setOpacity(data.opacity() + (1.0 - data.opacity()) * m_timeLine.currentValue());
|
||||||
break;
|
data.multiplyBrightness(1.0 - m_timeLine.currentValue());
|
||||||
case StateFadedOut:
|
break;
|
||||||
data.multiplyOpacity(0.0);
|
case StateFadedOut:
|
||||||
break;
|
data.multiplyOpacity(0.0);
|
||||||
case StateFadingIn:
|
data.multiplyBrightness(0.0);
|
||||||
data.multiplyOpacity(m_timeLine.currentValue());
|
break;
|
||||||
break;
|
case StateFadingIn:
|
||||||
default:
|
data.setOpacity(data.opacity() + (1.0 - data.opacity()) * (1.0 - m_timeLine.currentValue()));
|
||||||
// no adjustment
|
data.multiplyBrightness(m_timeLine.currentValue());
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// no adjustment
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
effects->paintWindow(w, mask, region, data);
|
effects->paintWindow(w, mask, region, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
This file is part of the KDE project.
|
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
|
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
|
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.
|
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>
|
Copyright (C) 2016 Marco Martin <mart@kde.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
|
Loading…
Reference in New Issue