Enable and disable owner-draw as needed

This commit is contained in:
Steve Cornett
2026-06-10 16:34:37 -07:00
parent a014ea5f56
commit 04c345d5f8
+2 -4
View File
@@ -96,10 +96,8 @@ void wxCheckBox::MSWSetDarkOrLightMode(SetMode setmode)
{
wxCheckBoxBase::MSWSetDarkOrLightMode(setmode);
// On Windows 11, the control properly handles switching to dark mode. But
// when switching to light mode, the text color remains the same.
// On Windows 10, the text color is always wrong.
MSWMakeOwnerDrawn(true);
// Use owner-draw mode if needed for dark mode or custom text colour
MSWMakeOwnerDrawn(wxMSWDarkMode::IsActive() || m_hasFgCol);
}
// ----------------------------------------------------------------------------