Update system palette on application init if needed
A style may have been set before the application was created, which would have resulted in setting the system palette based on the style's palette. Once the application is initialized and we have a platform theme we need to reset the system palette. Change-Id: Ia48f57d3983535c8633741d8027f75bc0c214018 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
6b06f12da6
commit
f6a2b81eab
@ -555,6 +555,12 @@ void QApplicationPrivate::init()
|
||||
|
||||
// Must be called before initialize()
|
||||
QColormap::initialize();
|
||||
if (sys_pal) {
|
||||
// Now that we have a platform theme we need to reset
|
||||
// the system palette to pick up the theme colors.
|
||||
clearSystemPalette();
|
||||
initSystemPalette();
|
||||
}
|
||||
qt_init_tooltip_palette();
|
||||
QApplicationPrivate::initializeWidgetFontHash();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user