mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-24 11:40:39 +08:00
This commit is contained in:
parent
a920ade12c
commit
b0937302d5
@ -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<const QScreen *, HWND, 4> 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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user