From 67683ab72a84ca28d97e2e33b2f1cd0a3475f745 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Mar 2023 13:21:25 +0100 Subject: [PATCH] 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. --- src/msw/headerctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp index 8a1bcdc80a..a0b474c8ab 100644 --- a/src/msw/headerctrl.cpp +++ b/src/msw/headerctrl.cpp @@ -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 ) {