UI: Monochrome Alert Icons and use the Question icon in the Quit dialog
Change to monochrome version of the large alert icons and use 'Question' for the the Quit Confirm dialog box. Differential Revision: https://developer.blender.org/D9062 Reviewed by Pablo Vazquez
This commit is contained in:
committed by
Harley Acheson
parent
1d84881ac1
commit
dc71ad0624
@@ -4706,23 +4706,8 @@ uiBut *uiDefButImage(
|
||||
uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
|
||||
{
|
||||
struct ImBuf *ibuf = UI_icon_alert_imbuf_get(icon);
|
||||
|
||||
if (icon == ALERT_ICON_BLENDER) {
|
||||
return uiDefButImage(block, ibuf, x, y, width, height, NULL);
|
||||
}
|
||||
|
||||
uchar icon_color[4];
|
||||
ThemeColorID color_id = TH_INFO_WARNING;
|
||||
if (icon == ALERT_ICON_ERROR) {
|
||||
color_id = TH_INFO_ERROR;
|
||||
}
|
||||
else if (icon == ALERT_ICON_INFO) {
|
||||
color_id = TH_INFO_INFO;
|
||||
}
|
||||
else if (icon == ALERT_ICON_QUESTION) {
|
||||
color_id = TH_INFO_PROPERTY;
|
||||
}
|
||||
UI_GetThemeColorType4ubv(color_id, SPACE_INFO, icon_color);
|
||||
UI_GetThemeColor4ubv(TH_TEXT, icon_color);
|
||||
return uiDefButImage(block, ibuf, x, y, width, height, icon_color);
|
||||
}
|
||||
|
||||
|
||||
@@ -3172,7 +3172,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C,
|
||||
|
||||
/* Alert Icon. */
|
||||
uiLayout *layout = uiLayoutColumn(split_block, false);
|
||||
uiDefButAlert(block, ALERT_ICON_WARNING, 0, 0, 0, icon_size);
|
||||
uiDefButAlert(block, ALERT_ICON_QUESTION, 0, 0, 0, icon_size);
|
||||
|
||||
/* The rest of the content on the right. */
|
||||
layout = uiLayoutColumn(split_block, false);
|
||||
|
||||
Reference in New Issue
Block a user