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