wxMessageDialog does show wrong icon (or not showing at all) (Issue #23353)

47 views
Skip to first unread message

Robert Nourgaliev

unread,
Mar 16, 2023, 10:03:37 AM3/16/23
to wx-...@googlegroups.com, Subscribed

wxMessageDialog does not show icons correctly, on Mac and some Linux systems (I am using RedHat toss3). See forum discussion at

https://forums.wxwidgets.org/viewtopic.php?f=23&t=50220&p=217951#p217951

Note, that wxRichMessageDialog is fine.


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

VZ

unread,
Mar 16, 2023, 11:31:24 AM3/16/23
to wx-...@googlegroups.com, Subscribed

The lack of icon in GTK is due to GTK theme not using icons. Unfortunately GTK doesn't use icons almost anywhere any more and while you can override it, you probably shouldn't do it to avoid making your application inconsistent with all the other ones on the system.

Under Mac message box shows the application icon because this is what the platform UI standard insists on.

IOW this isn't a bug, the behaviour just conforms to the native UI, as it's supposed to, but this should arguably be better documented as it's not really obvious.


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

Robert Nourgaliev

unread,
Mar 16, 2023, 11:35:32 AM3/16/23
to wx-...@googlegroups.com, Subscribed

So why wxRichMessageDialog, which derived from this, is working properly? It does show appropriate icons on both Mac and Linux.


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

VZ

unread,
Mar 16, 2023, 11:37:14 AM3/16/23
to wx-...@googlegroups.com, Subscribed

On these platforms wxRichMessageDialog uses a generic implementation not using the native dialog.


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

Robert Nourgaliev

unread,
Mar 16, 2023, 11:38:43 AM3/16/23
to wx-...@googlegroups.com, Subscribed

This probably should be documented.


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

Robert Nourgaliev

unread,
Mar 16, 2023, 11:52:57 AM3/16/23
to wx-...@googlegroups.com, Subscribed

On related issue: I started using wxRichMessageDialog, something like this:

        wxRichMessageDialog dialog (this,
                                    wxT("Mesh file exists! Proceed to overwrite?"),
                                    wxT("Please confirm"),
                                    wxYES_NO|wxCENTRE|wxICON_HAND);

dialog.ShowModal() returns 5103 on YES and 5104 on NO, while I thing the values should be 2 (wxYES) and 8 (wxNO). This is on both Mac and Linux. I could hard code these - but is it a bug - or I am doing something wrong here?


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

VZ

unread,
Mar 16, 2023, 11:56:35 AM3/16/23
to wx-...@googlegroups.com, Subscribed

No, this is not a bug, the dialog returns wxID_YES and wxID_NO, just as wxMessageDialog does.

This is already documented:

https://github.com/wxWidgets/wxWidgets/blob/8ad0f52da034b1295b7cabf278e833a4941694d2/interface/wx/msgdlg.h#L266-L267

which just goes to show that documenting things is not always enough...

But yes, it should still be done for the icons.

P.S. Please open separate issues for other problems.


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

Robert Nourgaliev

unread,
Mar 16, 2023, 12:03:34 PM3/16/23
to wx-...@googlegroups.com, Subscribed

Got it! Thanks!


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

VZ

unread,
Mar 18, 2023, 4:03:20 PM3/18/23
to wx-...@googlegroups.com, Subscribed

Closed #23353 as completed via c202385.


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/23353/issue_event/8785782322@github.com>

Reply all
Reply to author
Forward
0 new messages