apply palette from the QGuiPlatformPlugin instance if it is not null

palette from the config overrides even the platform plugin still (as it is
with the style for example)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-21 03:18:50 +03:00
parent 0d219c845c
commit 1d8cc1be87

View file

@ -599,9 +599,14 @@ bool QApplicationPrivate::x11_apply_settings()
QColor(strlist[i]));
}
// ### Fix properly for 4.6
if (groupCount == QPalette::NColorGroups)
if (groupCount == QPalette::NColorGroups) {
QApplicationPrivate::setSystemPalette(pal);
} else {
pal = qt_guiPlatformPlugin()->palette();
if (pal != QPalette()) {
QApplicationPrivate::setSystemPalette(pal);
}
}
QString fontDescription = settings.string(QLatin1String("Qt/font"));
if (!fontDescription.isEmpty()) {