Menu when dark mode is enabled looks like this:
And after we call _menuItem->SetDisabledBitmap for any of the menu items it becomes to look like this:
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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Also it would be very useful to have something like
bool IsDarkinwxMenuItemso 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.![]()
@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.![]()
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.![]()
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.![]()
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.![]()
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.![]()