diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 920d9044f02..973a47c5305 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2371,6 +2371,10 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon) but->flag |= UI_BUT_LIST_ITEM; } + if (layout->redalert) { + UI_but_flag_enable(but, UI_BUT_REDALERT); + } + return but; } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index b8a661c5542..ea588c703c6 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2281,7 +2281,12 @@ static void widget_state(uiWidgetType *wt, int state) if (state & UI_BUT_REDALERT) { char red[4] = {255, 0, 0}; - widget_state_blend(wt->wcol.inner, red, 0.4f); + if (wt->draw) { + widget_state_blend(wt->wcol.inner, red, 0.4f); + } + else { + widget_state_blend(wt->wcol.text, red, 0.4f); + } } if (state & UI_BUT_DRAG_MULTI) { @@ -3654,6 +3659,11 @@ static void widget_state_label(uiWidgetType *wt, int state) else UI_GetThemeColor3ubv(TH_TEXT, (unsigned char *)wt->wcol.text); } + + if (state & UI_BUT_REDALERT) { + char red[4] = {255, 0, 0}; + widget_state_blend(wt->wcol.text, red, 0.4f); + } } static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)