Only use NSCriticalAlertStyle for serious questions

Don't use NSCriticalAlertStyle for wxICON_WARNING unconditionally, this
was a violation of the OS X guidelines. According to the hig HIG,
NSCriticalAlertStyle (aka caution icon) is only appropriate in rare
cases and only if the user is performing a task that might result in the
inadvertent and unexpected destruction of data.

It therefore doesn't make sense to use it for information warnings, but
only for _questions_, and so NSCriticalAlertStyle is only used if a
combination of wxICON_WARNING with either wxYES_NO or wxCANCEL is used.
This commit is contained in:
Václav Slavík
2015-03-07 16:15:21 +01:00
parent 94fc40b7ea
commit 6b8b3ee379
2 changed files with 19 additions and 11 deletions

View File

@@ -53,7 +53,10 @@ const char wxMessageBoxCaptionStr[] = "Message";
@style{wxICON_ERROR}
Displays an error icon in the dialog.
@style{wxICON_WARNING}
Displays a warning icon in the dialog.
Displays a warning icon in the dialog. This style should be used for
informative warnings or, in combination with @c wxYES_NO or @c wxCANCEL,
for questions that have potentially serious consequences (caution
icon is used on OS X in this case).
@style{wxICON_QUESTION}
Displays a question mark symbol. This icon is automatically used
with @c wxYES_NO so it's usually unnecessary to specify it explicitly.