[Bf-blender-cvs] [4d6b892] master: Fix T47158: Labels w/ icons use button text color

Campbell Barton noreply at git.blender.org
Mon Jan 11 09:51:06 CET 2016


Commit: 4d6b8925e621f534eea4ebb440149053f06da496
Author: Campbell Barton
Date:   Mon Jan 11 19:35:39 2016 +1100
Branches: master
https://developer.blender.org/rB4d6b8925e621f534eea4ebb440149053f06da496

Fix T47158: Labels w/ icons use button text color

Icon buttons with text labels now use the same color as labels.

This was causing problems with theming since there was no way to set color
for all labels without also changing button text color.

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

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 e62018c..8198f68 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -3492,6 +3492,8 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
 			
 		/* specials */
 		case UI_WTYPE_ICON:
+			/* behave like regular labels (this is simply a label with an icon) */
+			wt.state = widget_state_label;
 			wt.custom = widget_icon_has_anim;
 			break;




More information about the Bf-blender-cvs mailing list