From af26720b2131e5a0db96965b231f4dfa2d5c5a2d Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 26 Oct 2021 14:59:50 +0200 Subject: UI: Use text highlight theme color for active tab Currently, both inactive and active tabs are using the `Region Text` theme property. This patch makes it so active tabs use `Region Text Highlight`. Since this check is done in other places already but was simply missing in this case, I believe this was just an oversight and not a design decision. Top is master, bottom is this patch: {F11520838, size=full} This allows this kind of tab highlight, not possible before since all tabs would have white text. {F11520873, size=full} Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D13003 --- source/blender/editors/interface/interface_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/interface/interface_panel.c') diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index a22351eea7e..072362492d8 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1550,7 +1550,7 @@ void UI_panel_category_draw_all(ARegion *region, const char *category_id_active) } BLF_position(fontid, rct->xmax - text_v_ofs, rct->ymin + tab_v_pad_text, 0.0f); - BLF_color3ubv(fontid, theme_col_text); + BLF_color3ubv(fontid, is_active ? theme_col_text_hi : theme_col_text); BLF_draw(fontid, category_id_draw, category_draw_len); GPU_blend(GPU_BLEND_NONE); -- cgit v1.2.3