diff --git a/6.8.0/qtbase/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp b/6.8.0/qtbase/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp index 208420d..1533367 100644 --- a/6.8.0/qtbase/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp +++ b/6.8.0/qtbase/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp @@ -52,6 +52,14 @@ static const int windowsRightBorder = 15; // right border on windows # define CMDLGS_DISABLED 4 #endif +namespace QOSWorkaround { + // Due to a mingw bug being confused by static constexpr variables in an exported class, + // we cannot use QOperatingSystemVersion::Windows11 in libraries outside of QtCore. + // ### TODO Remove this when that problem is fixed. + static constexpr QOperatingSystemVersionBase Windows11 { QOperatingSystemVersionBase::Windows, + 10, 0, 22000 }; +} + // QWindowsVistaStylePrivate ------------------------------------------------------------------------- // Static initializations QVarLengthFlatMap QWindowsVistaStylePrivate::m_vistaTreeViewHelpers; @@ -2911,6 +2919,10 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption theme.stateId = bullet ? MC_BULLETNORMAL: MC_CHECKMARKNORMAL; d->drawBackground(theme); } + else if (QOperatingSystemVersion::current() >= QOSWorkaround::Windows11 + && !act) { + painter->fillRect(checkRect, menuitem->palette.highlight().color().lighter(200)); + } } if (!menuitem->icon.isNull()) {