[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36000] trunk/blender/source/blender/ editors/interface/interface_widgets.c: UI fix:
Ton Roosendaal
ton at blender.org
Mon Apr 4 17:01:22 CEST 2011
Revision: 36000
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36000
Author: ton
Date: 2011-04-04 15:01:22 +0000 (Mon, 04 Apr 2011)
Log Message:
-----------
UI fix:
On dark menu backgrounds, the labels for Option buttons were not using
the theme colors for 'text on menu backdrop'.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_widgets.c
Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_widgets.c 2011-04-04 14:35:22 UTC (rev 35999)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c 2011-04-04 15:01:22 UTC (rev 36000)
@@ -1554,6 +1554,24 @@
}
+/* labels use theme colors for text */
+static void widget_state_option_menu(uiWidgetType *wt, int state)
+{
+
+ /* call this for option button */
+ widget_state(wt, state);
+
+ /* if not selected we get theme from menu back */
+ if(state & UI_SELECT)
+ UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
+ else {
+ bTheme *btheme= U.themes.first; /* XXX */
+
+ VECCOPY(wt->wcol.text, btheme->tui.wcol_menu_back.text);
+ }
+}
+
+
static void widget_state_nothing(uiWidgetType *wt, int UNUSED(state))
{
wt->wcol= *(wt->wcol_theme);
@@ -2938,6 +2956,11 @@
}
else
wt= widget_type(UI_WTYPE_TOGGLE);
+
+ /* option buttons have strings outside, on menus use different colors */
+ if(but->block->flag & UI_BLOCK_LOOP)
+ wt->state= widget_state_option_menu;
+
break;
case MENU:
More information about the Bf-blender-cvs
mailing list