Commit acea9036 authored by Tanbir Jishan's avatar Tanbir Jishan Committed by Fushan Wen
Browse files

kcms/colors: handle the "transparent" value explicitly

parent ad00948f
Pipeline #223842 passed with stage
in 6 minutes and 35 seconds
......@@ -126,13 +126,17 @@ void applyScheme(const QString &colorSchemePath, KConfig *configOutput, KConfig:
KSharedConfigPtr globalConfig = KSharedConfig::openConfig(QStringLiteral("kdeglobals"));
globalConfig->sync();
const auto hasAccent = [globalConfig]() {
return globalConfig->group("General").hasKey("AccentColor");
};
const auto getAccent = [globalConfig]() {
return globalConfig->group("General").readEntry<QColor>("AccentColor", QColor());
};
const auto hasAccent = [globalConfig, &getAccent]() {
if (getAccent() == QColor(Qt::transparent)) {
return false;
}
return globalConfig->group("General").hasKey("AccentColor");
};
// Using KConfig::SimpleConfig because otherwise Header colors won't be
// rewritten when a new color scheme is loaded.
KSharedConfigPtr config = KSharedConfig::openConfig(colorSchemePath, KConfig::SimpleConfig);
......
Supports Markdown
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