[Bf-blender-cvs] [61f1faac3f2] master: Fix T83868: Disabled or inactive list items are not grayed out

Hans Goudey noreply at git.blender.org
Thu Jan 7 23:28:34 CET 2021


Commit: 61f1faac3f2154de27cedbb100b938e447e5046f
Author: Hans Goudey
Date:   Thu Jan 7 16:28:26 2021 -0600
Branches: master
https://developer.blender.org/rB61f1faac3f2154de27cedbb100b938e447e5046f

Fix T83868: Disabled or inactive list items are not grayed out

The cause for this was quite simple-- a misplaced bitwise operation
before passing a value to the function that grayed out buttons based on
their state, caused by refactoring in rB933bf62a611f before committing.

What makes the situation a little more confusing is that the theme colors
are overridden for list buttons in UI lists, necessitating a second
call to `ui_widget_color_disabled()`. Ideally that wouldn't be necessary.

===================================================================

M	source/blender/editors/interface/interface_widgets.c

===================================================================

diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 7cd8cc7a13b..a99f05730bb 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2558,7 +2558,7 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag, eUIEmbossTyp
     wt->wcol_theme = &btheme->tui.wcol_list_item;
 
     if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE | UI_SEARCH_FILTER_NO_MATCH)) {
-      ui_widget_color_disabled(wt, state & UI_SEARCH_FILTER_NO_MATCH);
+      ui_widget_color_disabled(wt, state);
     }
   }



More information about the Bf-blender-cvs mailing list