diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 04:44:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 04:48:36 +0400 |
commit | 80af3d685773d58dbe73dc697658ddf93e81b0b7 (patch) | |
tree | 10ee5d92f370c0a0206ae2bbe346b61f08da4597 /source/blender/editors/interface/interface_panel.c | |
parent | 4b820fb673319989026433f284e11671885757c0 (diff) |
Tab theme colors
patch D234 from Jonathan Williamson with edits
- de-duplicate rna_def_userdef_theme_space_gradient and rna_def_userdef_theme_space_generic
- ui_theme_init_new_do now always sets theme settings (no need to test),
used by bpy.ops.ui.reset_default_theme()
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 69649651837..14523efaf18 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1418,9 +1418,12 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) unsigned char theme_col_text[4]; unsigned char theme_col_text_hi[4]; - /* Secondary theme colors */ + /* Tab colors */ unsigned char theme_col_tab_bg[4]; + unsigned char theme_col_tab_active[4]; unsigned char theme_col_tab_inactive[4]; + + /* Secondary theme colors */ unsigned char theme_col_tab_outline[4]; unsigned char theme_col_tab_divider[4]; /* line that divides tabs from the main area */ unsigned char theme_col_tab_highlight[4]; @@ -1432,11 +1435,12 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) UI_GetThemeColor4ubv(TH_TEXT, theme_col_text); UI_GetThemeColor4ubv(TH_TEXT_HI, theme_col_text_hi); - blend_color_interpolate_byte(theme_col_tab_bg, theme_col_back, theme_col_text, 0.2f); - blend_color_interpolate_byte(theme_col_tab_inactive, theme_col_back, theme_col_text, 0.10f); - blend_color_interpolate_byte(theme_col_tab_outline, theme_col_back, theme_col_text, 0.3f); - blend_color_interpolate_byte(theme_col_tab_divider, theme_col_back, theme_col_text, 0.3f); + UI_GetThemeColor4ubv(TH_TAB_BACK, theme_col_tab_bg); + UI_GetThemeColor4ubv(TH_TAB_ACTIVE, theme_col_tab_active); + UI_GetThemeColor4ubv(TH_TAB_INACTIVE, theme_col_tab_inactive); + UI_GetThemeColor4ubv(TH_TAB_OUTLINE, theme_col_tab_outline); + blend_color_interpolate_byte(theme_col_tab_divider, theme_col_back, theme_col_text, 0.3f); blend_color_interpolate_byte(theme_col_tab_highlight, theme_col_back, theme_col_text_hi, 0.2f); blend_color_interpolate_byte(theme_col_tab_highlight_inactive, theme_col_tab_inactive, theme_col_text_hi, 0.12f); @@ -1509,7 +1513,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) if (is_active) #endif { - glColor3ubv(is_active ? theme_col_back : theme_col_tab_inactive); + glColor3ubv(is_active ? theme_col_tab_active : theme_col_tab_inactive); ui_panel_category_draw_tab(GL_POLYGON, rct->xmin, rct->ymin, rct->xmax, rct->ymax, tab_curve_radius - px, roundboxtype, true, true, NULL); |