[Bf-blender-cvs] [c3113724ed7] blender-v2.90-release: Fix T78630: Custom icons not grayed out in inactive layouts

Julian Eisel noreply at git.blender.org
Wed Aug 5 12:19:45 CEST 2020


Commit: c3113724ed7e0b758f381ddef4270ad129ff93e1
Author: Julian Eisel
Date:   Wed Aug 5 12:12:05 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBc3113724ed7e0b758f381ddef4270ad129ff93e1

Fix T78630: Custom icons not grayed out in inactive layouts

For regular icons this worked because they used the text color, which
was already grayed out by the caller.

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

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 2bc2ed5f5e8..f1811031cc7 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1401,7 +1401,7 @@ static void widget_draw_icon(
     }
   }
   else if (ELEM(but->type, UI_BTYPE_BUT)) {
-    if (but->flag & UI_BUT_DISABLED) {
+    if (but->flag & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
       alpha *= 0.5f;
     }
   }



More information about the Bf-blender-cvs mailing list