Commit d6ea0bbb authored by David Redondo's avatar David Redondo 🏎

When resetting to system default do not use the standard palette of the style

The standard palette of the style can be different than the system pallete.
This is visible for example with the MS Windows 9x style. Unfortunately there
is no explicit way to reset to the system palette, so set the palette to the
one of the default color scheme.
parent de958335
......@@ -41,7 +41,7 @@ static void activateScheme(const QString &colorSchemePath) {
// ApplicationPaletteChange event.
qApp->setProperty("KDE_COLOR_SCHEME_PATH", colorSchemePath);
if (colorSchemePath.isEmpty()) {
qApp->setPalette(qApp->style()->standardPalette());
qApp->setPalette(KColorScheme::createApplicationPalette(KSharedConfig::Ptr(nullptr)));
} else {
qApp->setPalette(KColorScheme::createApplicationPalette(KSharedConfig::openConfig(colorSchemePath)));
}
......
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