Combobox popup border drawn incorrectly in Win32 dark mode (Issue #26573)

19 views
Skip to first unread message

PB

unread,
Jun 8, 2026, 1:52:02 PM (5 days ago) Jun 8
to wx-...@googlegroups.com, Subscribed
PBfordev created an issue (wxWidgets/wxWidgets#26573)

The border of the combobox popup is drawn incorrectly on Windows in dark mode in the GIT master. It seems to be broken by 5bd892f.

Now
wxcombo-popup-bad.png (view on web)

Before (the same as in the native file dialog file type combo)
wxcombo-popup-good.png (view on web)

  • wxWidgets version: the GIT master (f12b247)
  • wxWidgets port: wxMSW
  • OS: Windows 11 25H2 (build 26200.8457), dark mode


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.Message ID: <wxWidgets/wxWidgets/issues/26573@github.com>

VZ

unread,
Jun 8, 2026, 1:53:49 PM (5 days ago) Jun 8
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26573)

Oops, thanks for noticing. @Fefedu973 would you have any ideas about how to fix this without reverting your change?


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.Message ID: <wxWidgets/wxWidgets/issues/26573/4651833498@github.com>

Ferréol DUBOIS COLI

unread,
Jun 8, 2026, 1:56:37 PM (5 days ago) Jun 8
to wx-...@googlegroups.com, Subscribed
Fefedu973 left a comment (wxWidgets/wxWidgets#26573)

I'll take a look !
Thanks


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.Message ID: <wxWidgets/wxWidgets/issues/26573/4651856651@github.com>

Ferréol DUBOIS COLI

unread,
Jun 8, 2026, 3:07:42 PM (5 days ago) Jun 8
to wx-...@googlegroups.com, Subscribed
Fefedu973 left a comment (wxWidgets/wxWidgets#26573)

I investigated this a bit more, and the problem seems to be that we can't fix this reliably by only changing the SetWindowTheme() arguments for the popup list HWND.

The regression comes from the change made for #26535 / #26538. Before that fix, applying a full theme to the popup/list HWND made the selected item unreadable on recent Windows 11 builds. Limiting the popup HWND to:

wxMSWDarkMode::AllowForWindow(info.hwndList, L"Explorer", L"ScrollBar");

fixes the unreadable selection and keeps the scrollbar dark, but it also means that Windows no longer draws the combobox popup frame/border correctly, which causes this issue.

I tried a few theme combinations:

  • Explorer + ScrollBar: selected item is readable, scrollbar is dark, but the popup outline is missing/broken.
  • Explorer + ComboBox;ScrollBar: the outline can come back, but the scrollbar rendering can become wrong depending on the ordering/OS behaviour.
  • CFD + ScrollBar: restores a border, but it is a light/white border and the scrollbar also becomes light.

So it looks like SetWindowTheme() is not granular enough here: we would need the list HWND to use ScrollBar theming for the scrollbar, but ComboBox/popup theming for the frame, without applying a full listbox theme that breaks item selection. A single theme/subclass list doesn't seem to provide that.

The fix that works locally is to keep the #26538 theming:

wxMSWDarkMode::AllowForWindow(info.hwndList, L"Explorer", L"ScrollBar");

and handle only the missing popup frame separately by subclassing info.hwndList and redrawing the border in WM_NCPAINT/WM_PAINT/WM_WINDOWPOSCHANGED.

This keeps the important behaviour from #26538:

  • selected item remains readable,
  • scrollbar remains dark,
  • the combobox popup outline is restored,
  • and we don't re-apply a full list/listbox theme to the popup HWND.

I have tested this locally and it fixes the missing outline without reintroducing #26535.


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.Message ID: <wxWidgets/wxWidgets/issues/26573/4652484183@github.com>

VZ

unread,
Jun 10, 2026, 12:04:50 PM (3 days ago) Jun 10
to wx-...@googlegroups.com, Subscribed

Closed #26573 as completed via de11441.


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.Message ID: <wxWidgets/wxWidgets/issue/26573/issue_event/26583314467@github.com>

Reply all
Reply to author
Forward
0 new messages