- QColor backgroundColor = palette().window().color();
- if (m_illumination > 0) {
- // at this point, a: we are a second label being drawn over the already
- // painted status area, so we can be translucent, and b: our palette's
- // window color (bg only) seems to be wrong (always black)
- KColorScheme scheme(palette().currentColorGroup(), KColorScheme::Window);
- backgroundColor = scheme.background(KColorScheme::NegativeBackground).color();
- backgroundColor.setAlpha(qMin(255, m_illumination*2));
+ QColor backgroundColor;
+ if (m_state == Default || m_illumination < 0) backgroundColor = palette().window().color();
+ else {
+ backgroundColor = KStatefulBrush(KColorScheme::Window, KColorScheme::NegativeBackground, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
+ }
+ if (m_state == Desaturate && m_illumination > 0) {
+ backgroundColor.setAlpha(m_illumination * 2);