Fix #111831: Proper Highlighting of Inactive Buttons #112159

Merged
Harley Acheson merged 1 commits from Harley/blender:InactiveActive into main 2023-09-08 19:42:54 +02:00
1 changed files with 9 additions and 1 deletions

View File

@ -2726,10 +2726,18 @@ static void widget_state_menu_item(uiWidgetType *wt,
color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.5f);
wt->wcol.inner[3] = 64;
}
else if (state->but_flag & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
else if (state->but_flag & UI_BUT_DISABLED) {
/* Regular disabled. */
color_blend_v3_v3(wt->wcol.text, wt->wcol.inner, 0.5f);
}
else if (state->but_flag & UI_BUT_INACTIVE) {
/* Inactive. */
if (state->but_flag & UI_ACTIVE) {
color_blend_v3_v3(wt->wcol.inner, wt->wcol.text, 0.2f);
wt->wcol.inner[3] = 255;
}
color_blend_v3_v3(wt->wcol.text, wt->wcol.inner, 0.5f);
}
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);