diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index 46a2b7e0ad..fa727e9729 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -2264,6 +2264,20 @@ static void populateLightSystemBasePalette(QPalette &result) oldStyleSheet = qApp->styleSheet(); } +static void populateDarkSystemBasePalette(QPalette &result) +{ + static QString oldStyleSheet; + const bool styleSheetChanged = oldStyleSheet != qApp->styleSheet(); + + const QColor alternateBase = QColor(0xFF,0xFF,0xFF,0x0F); + + SET_IF_UNRESOLVED(QPalette::Active, QPalette::AlternateBase, alternateBase); + + SET_IF_UNRESOLVED(QPalette::Inactive, QPalette::AlternateBase, alternateBase); + + oldStyleSheet = qApp->styleSheet(); +} + /*! \internal */ @@ -2274,6 +2288,8 @@ void QWindows11Style::polish(QPalette& result) if (!highContrastTheme && colorSchemeIndex == 0) populateLightSystemBasePalette(result); + else if (!highContrastTheme && colorSchemeIndex == 1) + populateDarkSystemBasePalette(result); const bool styleSheetChanged = false; // so the macro works