Use critical alert style for wxICON_ERROR too in wxOSX
After the changes of 6b8b3ee379
we could
use NSCriticalAlertStyle for message boxes with wxICON_WARNING, if they
also has Yes/No or Cancel button, but never for wxICON_ERROR, for which
just NSWarningAlertStyle was used, which seems counterintuitive, so
change the code to use NSCriticalAlertStyle for either wxICON_WARNING or
wxICON_ERROR message boxes asking the user about something.
Closes https://github.com/wxWidgets/wxWidgets/pull/1242
This commit is contained in:
@@ -31,7 +31,7 @@ namespace
|
||||
{
|
||||
NSAlertStyle GetAlertStyleFromWXStyle( long style )
|
||||
{
|
||||
if (style & wxICON_WARNING)
|
||||
if (style & (wxICON_WARNING | wxICON_ERROR))
|
||||
{
|
||||
// NSCriticalAlertStyle should only be used for questions where
|
||||
// caution is needed per the OS X HIG. wxICON_WARNING alone doesn't
|
||||
@@ -42,8 +42,6 @@ namespace
|
||||
else
|
||||
return NSWarningAlertStyle;
|
||||
}
|
||||
else if (style & wxICON_ERROR)
|
||||
return NSWarningAlertStyle;
|
||||
else
|
||||
return NSInformationalAlertStyle;
|
||||
}
|
||||
|
Reference in New Issue
Block a user