diff --git a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp index 3ba470f..81ce4f9 100644 --- a/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp +++ b/src/qt6ct-qtplugin/qt6ctplatformtheme.cpp @@ -167,6 +167,12 @@ void Qt6CTPlatformTheme::applySettings() QGuiApplication::setFont(m_generalFont); //apply font + if(!m_palette) + m_palette = std::make_unique(*QGenericUnixTheme::palette(QPlatformTheme::SystemPalette)); + + if(m_update && m_usePalette) + qApp->setPalette(*m_palette); + #ifdef QT_WIDGETS_LIB if(hasWidgets()) { @@ -180,12 +186,6 @@ void Qt6CTPlatformTheme::applySettings() Qt6CT::reloadStyleInstanceSettings(); } - if(!m_palette) - m_palette = std::make_unique(*QGenericUnixTheme::palette(QPlatformTheme::SystemPalette)); - - if(m_update && m_usePalette) - qApp->setPalette(*m_palette); - if(m_userStyleSheet != m_prevStyleSheet) { // prepend our stylesheet to that of the application