Bugfix #36324
Commit 57760, June this year, broke Theme colors for Label Buttons. All labels, in every editor or region, now were using same color. These colors have to be derived from the Editor settings. Code for this was mistakingly removed.
This commit is contained in:
@@ -2850,6 +2850,16 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
|
||||
rect->xmin += BLI_rcti_size_y(rect) * 0.7 + delta;
|
||||
}
|
||||
|
||||
/* labels use Editor theme colors for text */
|
||||
static void widget_state_label(uiWidgetType *wt, int state)
|
||||
{
|
||||
/* call this for option button */
|
||||
widget_state(wt, state);
|
||||
if (state & UI_SELECT)
|
||||
UI_GetThemeColor3ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
|
||||
else
|
||||
UI_GetThemeColor3ubv(TH_TEXT, (unsigned char *)wt->wcol.text);
|
||||
}
|
||||
|
||||
static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
|
||||
{
|
||||
@@ -2973,6 +2983,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
|
||||
/* fall-through */ /* we use usual label code too. */
|
||||
case UI_WTYPE_LABEL:
|
||||
wt.draw = NULL;
|
||||
wt.state = widget_state_label;
|
||||
break;
|
||||
|
||||
case UI_WTYPE_TOGGLE:
|
||||
|
||||
Reference in New Issue
Block a user