Merge branch 'Plasma/5.12'
commit
a5a661211c
|
@ -105,15 +105,19 @@ 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());
|
||||
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.multiplyOpacity(m_timeLine.currentValue());
|
||||
data.setOpacity(data.opacity() + (1.0 - data.opacity()) * (1.0 - m_timeLine.currentValue()));
|
||||
data.multiplyBrightness(m_timeLine.currentValue());
|
||||
break;
|
||||
default:
|
||||
// no adjustment
|
||||
|
|
|
@ -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 New Issue