[wxMSW 3.3.0 Dark Mode] wxMenuItem incorrect colors after SetDisabledBitmap is called (Issue #25577)

32 views
Skip to first unread message

Sergiy Kurinny

unread,
Jun 26, 2025, 7:17:02 AMJun 26
to wx-...@googlegroups.com, Subscribed
generalloki created an issue (wxWidgets/wxWidgets#25577)

Description

Bug description:

Menu when dark mode is enabled looks like this:

image.png (view on web)

And after we call _menuItem->SetDisabledBitmap for any of the menu items it becomes to look like this:

image.png (view on web)

Expected vs observed behavior:

It is expected to remain on dark theme after SetDisabledBitmap is called. Also it would be very useful to have
something like bool IsDark in wxMenuItem so we would know exactly what images to assign to the menu item (dark or light). Currently it is not possible to determine what images to assign.

Platform and version information

  • wxWidgets 3.3.0
  • wxWidgets wxMSW
  • OS Windows 11


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/25577@github.com>

PB

unread,
Jun 26, 2025, 8:13:51 AMJun 26
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#25577)

Also it would be very useful to have something like bool IsDark in wxMenuItem so we would know exactly what images to assign to the menu item (dark or light). Currently it is not possible to determine what images to assign.

Not that it helps here, but dark/light is not menu-specific, it is an application-global setting and can be queried with wxSystemAppearance::IsDark().


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/25577/3008275882@github.com>

Sergiy Kurinny

unread,
Jun 26, 2025, 9:06:05 AMJun 26
to wx-...@googlegroups.com, Subscribed
generalloki left a comment (wxWidgets/wxWidgets#25577)

@PBfordev , as you see on pictures which I enclosed to this issue, [wxSystemAppearance::IsDark()](https://docs.wxwidgets.org/trunk/classwx_system_appearance.html#a399d06fab6086dc97508f1704e3f0f0a) is ignored by the wxMenuItemon MSW when dark theme is enabled after some calls. I believe not onlySetDisabledBitmap` call, but also set menu item background/foreground color will also turn off dark mode for wxMenuItem. Preferrably to fix this problem, but at least knowing whether wxMenuItem is truly in dark mode would be nice to know.


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/25577/3008431326@github.com>

PB

unread,
Jun 26, 2025, 9:11:02 AMJun 26
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#25577)

IMO, it is not ignored, it is just an another issue with the limitations of the native menu control or in wxWidgets. It does not make any sense to mix dark and light menus or account for some items being dark and some not.


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/25577/3008446027@github.com>

VZ

unread,
Jul 5, 2025, 11:33:37 AMJul 5
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25577)

It looks like dark mode is not supported for owner-drawn menu items (i.e. those using MFT_OWNERDRAW) and I'm not sure if it can be fixed, at least short of drawing the entire menu ourselves.

IOW I don't think this is going to be supported unless someone is willing to invest a lot of time into it, sorry.


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/25577/3039190157@github.com>

Mohmed abdel-fattah

unread,
Dec 23, 2025, 8:18:14 AM (3 days ago) Dec 23
to wx-...@googlegroups.com, Subscribed
memoarfaa left a comment (wxWidgets/wxWidgets#25577)

It looks like dark mode is not supported for owner-drawn menu items (i.e. those using MFT_OWNERDRAW) and I'm not sure if it can be fixed, at least short of drawing the entire menu ourselves.

IOW I don't think this is going to be supported unless someone is willing to invest a lot of time into it, sorry.

Hi @vadz

No, dark mode can easily supported for owner-drawn menu with items I can create Pull request if this is required.

https://github.com/user-attachments/assets/c7e4d9e2-11d6-4e10-881d-f3cb45bddfcb

https://github.com/user-attachments/assets/20d4eaa7-1c3c-4995-afd9-1913463bdf63


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/25577/3686611010@github.com>

VZ

unread,
Dec 23, 2025, 8:23:35 AM (3 days ago) Dec 23
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25577)

Any PRs would definitely be welcome, thanks in advance!


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/25577/3686625329@github.com>

Reply all
Reply to author
Forward
0 new messages