decorations: when color scheme has no Header colors, don't ask for them

First we check to see if the color scheme has header colors, and if it
doesn't, we turn around and ask for them anyway, relying on implicit
behavior in kcolorscheme that falls back to Window colors when Header
colors are requested but are not present. Instead, let's just ask for
Window colors to avoid the run-around and stop relying on implicit
behavior.
This commit is contained in:
Nate Graham 2021-10-19 07:16:58 -06:00
parent 483ef644df
commit 00ade26624

View file

@ -132,8 +132,8 @@ void DecorationPalette::update()
KConfigGroup wmConfig(m_colorSchemeConfig, QStringLiteral("WM"));
if (!wmConfig.exists()) {
m_palette.active = KColorScheme(QPalette::Normal, KColorScheme::Header, m_colorSchemeConfig);
m_palette.inactive = KColorScheme(QPalette::Inactive, KColorScheme::Header, m_colorSchemeConfig);
m_palette.active = KColorScheme(QPalette::Normal, KColorScheme::Window, m_colorSchemeConfig);
m_palette.inactive = KColorScheme(QPalette::Inactive, KColorScheme::Window, m_colorSchemeConfig);
m_legacyPalette.reset();
return;
}