Commit ef1b01c6 authored by Nate Graham's avatar Nate Graham
Browse files

kcms/colors: Don't apply header accent colors to non-Header color schemes

When applying an accent color, the color was added to the color scheme's
Header color group. But not all color schemes have this group, and
adding it made the color scheme break in creative ways.

BUG: 443786
FIXED-IN: 5.23.1


(cherry picked from commit ebd4e8e9)
parent 1a3699a8
......@@ -68,6 +68,14 @@ void applyScheme(const QString &colorSchemePath, KConfig *configOutput, KConfig:
for (auto item : colorSetGroupList) {
configOutput->deleteGroup(item);
// Not all color schemes have header colors; in this case we don't want
// to write out any header color data because then various things will think
// the color scheme *does* have header colors, which it mostly doesn't, and
// things will visually break in creative ways
if (item == QStringLiteral("Colors:Header") && !config->hasGroup(QStringLiteral("Colors:Header"))) {
continue;
}
KConfigGroup sourceGroup(config, item);
KConfigGroup targetGroup(configOutput, item);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment