wxNotebook::GetThemeBackgroundColour() returns incorrect result when using high contrast (Issue #25542)

21 views
Skip to first unread message

VZ

unread,
Jun 18, 2025, 1:57:40 PM6/18/25
to wx-...@googlegroups.com, Subscribed
vadz created an issue (wxWidgets/wxWidgets#25542)

Ah I forgot to bring it up before it was fixed. It may be good to come up with a better solution here on Windows.

https://gitlab.com/kicad/code/kicad/-/issues/17262

Windows 10/11 has high contrast mode which alters the dialog colors. GetThemeBackgroundColor falls through to the white color on it as well.

Originally posted by @marekr in #25527


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25542@github.com>

VZ

unread,
Jun 18, 2025, 2:01:50 PM6/18/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25542)

Note to self: this happens when using "high contrast black" mode, which is not "dark mode".


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25542/2985233819@github.com>

VZ

unread,
Jun 18, 2025, 2:33:03 PM6/18/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25542)

Unless I'm missing something (which is quite possible, of course), there is no way to get the colours used in high contrast modes using GetThemeColor(), so we're going to need to explicitly test for the high contrast mode to fix this.

Please let me know if anybody knows more about this/sees a better way to handle it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25542/2985319707@github.com>

VZ

unread,
Jun 18, 2025, 6:26:18 PM6/18/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25542)

Actually I take my words back, I think I did find a way to get the correct colour and it's rather simple, even if slightly hacky, please see #25545 and the commit auto-linked above.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25542/2985882909@github.com>

VZ

unread,
Jun 22, 2025, 2:51:32 PM6/22/25
to wx-...@googlegroups.com, Subscribed

Closed #25542 as completed via a4f251e.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/25542/issue_event/18262264066@github.com>

Reply all
Reply to author
Forward
0 new messages