Don't reset wxMSW wxHeaderCtrl colours in dark mode on DPI change

We still need to use custom colours even if we don't have any user-set
colours when using dark mode, otherwise the colours reverted to the
normal ones for light mode (and hence wrong in the dark one) on DPI
change.

Closes #23322.
This commit is contained in:
Vadim Zeitlin 2023-03-12 13:21:25 +01:00
parent 3142e028b2
commit 67683ab72a

View file

@ -660,7 +660,7 @@ wxMSWHeaderCtrlCustomDraw* wxMSWHeaderCtrl::GetCustomDraw()
// custom font, the native control handles the font just fine on its own,
// so if our custom colours were reset, don't bother with custom drawing
// any longer.
if ( !m_hasBgCol && !m_hasFgCol )
if ( !m_hasBgCol && !m_hasFgCol && !wxMSWDarkMode::IsActive() )
{
if ( m_customDraw )
{