Changeset View
Changeset View
Standalone View
Standalone View
effects/kscreen/kscreen.cpp
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 99 | { | |||
---|---|---|---|---|---|
100 | if (m_state != StateNormal) { | 100 | if (m_state != StateNormal) { | ||
101 | data.setTranslucent(); | 101 | data.setTranslucent(); | ||
102 | } | 102 | } | ||
103 | effects->prePaintWindow(w, data, time); | 103 | effects->prePaintWindow(w, data, time); | ||
104 | } | 104 | } | ||
105 | 105 | | |||
106 | void KscreenEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) | 106 | void KscreenEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) | ||
107 | { | 107 | { | ||
108 | //fade to black and fully opaque | ||||
108 | switch (m_state) { | 109 | switch (m_state) { | ||
109 | case StateFadingOut: | 110 | case StateFadingOut: | ||
110 | data.multiplyOpacity(1.0 - m_timeLine.currentValue()); | 111 | data.setOpacity(data.opacity() + (1.0 - data.opacity()) * m_timeLine.currentValue()); | ||
112 | data.multiplyBrightness(1.0 - m_timeLine.currentValue()); | ||||
111 | break; | 113 | break; | ||
112 | case StateFadedOut: | 114 | case StateFadedOut: | ||
113 | data.multiplyOpacity(0.0); | 115 | data.multiplyOpacity(0.0); | ||
116 | data.multiplyBrightness(0.0); | ||||
114 | break; | 117 | break; | ||
115 | case StateFadingIn: | 118 | case StateFadingIn: | ||
116 | data.multiplyOpacity(m_timeLine.currentValue()); | 119 | data.setOpacity(data.opacity() + (1.0 - data.opacity()) * (1.0 - m_timeLine.currentValue())); | ||
120 | data.multiplyBrightness(m_timeLine.currentValue()); | ||||
117 | break; | 121 | break; | ||
118 | default: | 122 | default: | ||
119 | // no adjustment | 123 | // no adjustment | ||
120 | break; | 124 | break; | ||
121 | } | 125 | } | ||
122 | effects->paintWindow(w, mask, region, data); | 126 | effects->paintWindow(w, mask, region, data); | ||
123 | } | 127 | } | ||
124 | 128 | | |||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |