UI: Fixes for the highlighting of Selected Enums #111938
|
@ -4470,9 +4470,8 @@ static void ui_def_but_rna__menu(bContext * /*C*/, uiLayout *layout, void *but_p
|
|||
-1,
|
||||
item->description);
|
||||
}
|
||||
item_but->flag |= UI_BUT_LIST_ITEM;
|
||||
if (item->value == current_value) {
|
||||
item_but->flag |= UI_BUT_ACTIVE_DEFAULT;
|
||||
item_but->flag |= UI_SELECT_DRAW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2737,10 +2737,8 @@ static void widget_state_menu_item(uiWidgetType *wt,
|
|||
/* Regular disabled. */
|
||||
color_blend_v3_v3(wt->wcol.text, wt->wcol.inner, 0.5f);
|
||||
}
|
||||
else if ((state->but_flag & UI_BUT_LIST_ITEM) &&
|
||||
state->but_flag & (UI_BUT_ACTIVE_DEFAULT | UI_SELECT))
|
||||
{
|
||||
/* Currently-selected list item. */
|
||||
else if (state->but_flag & (UI_BUT_ACTIVE_DEFAULT | UI_SELECT_DRAW)) {
|
||||
/* Currently-selected item. */
|
||||
copy_v4_v4_uchar(wt->wcol.inner, wt->wcol.inner_sel);
|
||||
copy_v4_v4_uchar(wt->wcol.text, wt->wcol.text_sel);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue