[Bf-blender-cvs] [af26720b213] master: UI: Use text highlight theme color for active tab

Pablo Vazquez noreply at git.blender.org
Tue Oct 26 15:00:47 CEST 2021


Commit: af26720b2131e5a0db96965b231f4dfa2d5c5a2d
Author: Pablo Vazquez
Date:   Tue Oct 26 14:59:50 2021 +0200
Branches: master
https://developer.blender.org/rBaf26720b2131e5a0db96965b231f4dfa2d5c5a2d

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

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

M	release/scripts/presets/interface_theme/Blender_Light.xml
M	source/blender/editors/interface/interface_panel.c

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

diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml
index f4188e83e34..e3ac77b008d 100644
--- a/release/scripts/presets/interface_theme/Blender_Light.xml
+++ b/release/scripts/presets/interface_theme/Blender_Light.xml
@@ -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"
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);



More information about the Bf-blender-cvs mailing list