The problem fixed is that when creating a wxTextCtrl with default themed border in dark mode and then switching to light mode, the border remains dark. To repro, run the widgets sample, set the page to Text, restart in dark mode, and switch to light mode.
This problem was introduced in d5aacc4. The problem is caused by wxTextCtrl::CanApplyThemeBorder() returning true in dark mode. This causes the control to be created without any border style flags. This is not a problem in dark mode because in that case we draw a custom border. But upon switching to light mode, the control does not redraw a border, apparently because it thinks it has no border. The default system WM_NCPAINT processing does nothing.
The fix is to restore wxTextCtrl::CanApplyThemeBorder() as it worked before d5aacc4. Instead of relying on that function to determine whether our custom border is drawn, the WM_NCPAINT handler is modified to detect this condition. This way, the control is always created consistently, regardless of dark mode.
https://github.com/wxWidgets/wxWidgets/pull/26794
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()