wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.21k stars 509 forks source link

Native error dialog on MacOS does not show exclamation mark icon #2546

Open wouterbt opened 1 month ago

wouterbt commented 1 month ago

Operating system: MacOS 14.2.1 (Sonoma) wxPython version & source: 4.2.1 (Phoenix) installed by pip from wheel wxPython-4.2.1-cp39-cp39-macosx_10_10_universal2.whl Python version & source: 3.9.12 included with MacOS

Description of the problem:

wx.MessageDialog uses native dialog windows on MacOS. When used with the wx.ICON_ERROR style, it should show an error icon (exclamation mark) in the dialog. However, it only does this in combination with the wx.YES_NO style:
YES_NO-dialog And not with the wx.OK style or with no other styles (the default):
OK-dialog The expected behaviour is that the exclamation mark icon is shown in both instances.

Code Example (click to expand) ```python import wx app = wx.App() frame = wx.Frame() dlg = wx.MessageDialog(frame, 'text', 'Error', wx.ICON_ERROR | wx.OK) dlg.ShowModal() dlg.Destroy() dlg = wx.MessageDialog(frame, 'text', 'Error', wx.ICON_ERROR | wx.YES_NO) dlg.ShowModal() ```