diff --git a/src/decorations/decorationpalette.cpp b/src/decorations/decorationpalette.cpp index 1162691138..a365b1513e 100644 --- a/src/decorations/decorationpalette.cpp +++ b/src/decorations/decorationpalette.cpp @@ -121,13 +121,15 @@ QColor DecorationPalette::color(KDecoration2::ColorGroup group, KDecoration2::Co QPalette DecorationPalette::palette() const { - return m_legacyPalette ? m_legacyPalette->palette : KColorScheme::createApplicationPalette(m_colorSchemeConfig); + return m_legacyPalette ? m_legacyPalette->palette : m_applicationPalette; } void DecorationPalette::update() { m_colorSchemeConfig->sync(); + m_applicationPalette = KColorScheme::createApplicationPalette(m_colorSchemeConfig); + if (KColorScheme::isColorSetSupported(m_colorSchemeConfig, KColorScheme::Header)) { m_palette.active = KColorScheme(QPalette::Normal, KColorScheme::Header, m_colorSchemeConfig); m_palette.inactive = KColorScheme(QPalette::Inactive, KColorScheme::Header, m_colorSchemeConfig); diff --git a/src/decorations/decorationpalette.h b/src/decorations/decorationpalette.h index 8529c8fe42..a0737cda92 100644 --- a/src/decorations/decorationpalette.h +++ b/src/decorations/decorationpalette.h @@ -68,6 +68,7 @@ private: KSharedConfig::Ptr m_colorSchemeConfig; ModernPalette m_palette; + QPalette m_applicationPalette; }; }