summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qpalette.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-03-17 19:46:33 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-20 09:32:34 +0100
commitc4ac14fae1765cae9d5ab94c8af486e2d14dede7 (patch)
treee6e2b2d00d893e8176f080f0b9c69ecf905542f5 /src/gui/kernel/qpalette.cpp
parent6d9f04422ac2b64e43f0e78c1fdb9ced29e4b187 (diff)
Fix KDE palette.
In QKdeTheme We want to load every color. Else, only the first color is loaded, and the rest of the palette is just black making the applications basicaly not usable. But KDE only put in its config files the colors that are different from the default colors. This is the reason why we need to resolve against the style's default palette. We need to make sure the resolve_mask is 0 for an empty palette, even before the application palette is set. This was not required in Qt4 because the system palette was initialized differently. I realize this will only work with QApplication (and not with a single QGuiApplication) but it was not working before either. Change-Id: Ifb3c2c1358ef6d83a1ca5aa8fac3d2d4ea712b94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui/kernel/qpalette.cpp')
-rw-r--r--src/gui/kernel/qpalette.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 9a2eb12e3f..ab62ec0992 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -524,6 +524,7 @@ QPalette::QPalette()
} else {
init();
qt_palette_from_color(*this, Qt::black);
+ resolve_mask = 0;
}
}