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
This commit is contained in:
Pablo Vazquez 2021-10-26 14:59:50 +02:00
parent 75704091fc
commit af26720b21
2 changed files with 20 additions and 20 deletions

View File

@ -434,7 +434,7 @@
button="#99999900"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#b3b3b3"
@ -509,7 +509,7 @@
button="#999999e6"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -555,7 +555,7 @@
button="#999999e6"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#999999e6"
tab_active="#6697e6"
@ -613,7 +613,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -688,7 +688,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -773,7 +773,7 @@
button="#99999900"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#b3b3b3"
@ -833,7 +833,7 @@
button="#99999900"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#b3b3b3"
@ -870,7 +870,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#656565ff"
execution_buts="#00000000"
tab_active="#6697e6"
@ -917,7 +917,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -981,7 +981,7 @@
button="#99999900"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#b3b3b3"
@ -1032,7 +1032,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -1081,7 +1081,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -1115,7 +1115,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#b3b3b3ff"
execution_buts="#b3b3b3ff"
tab_active="#6697e6"
@ -1156,7 +1156,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -1221,7 +1221,7 @@
button="#7272727f"
button_title="#000000"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#6697e6"
@ -1263,8 +1263,8 @@
header_text_hi="#ffffff"
button="#2f303599"
button_title="#ffffff"
button_text="#ffffff"
button_text_hi="#ffffff"
button_text="#000000"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#446499"
@ -1298,7 +1298,7 @@
button="#2f303500"
button_title="#ffffff"
button_text="#ffffff"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#00000000"
tab_active="#446499"
@ -1334,7 +1334,7 @@
button="#999999e6"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
button_text_hi="#000000"
navigation_bar="#00000000"
execution_buts="#999999e6"
tab_active="#6697e6"

View File

@ -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);