[Bf-blender-cvs] [5e5db7db896] blender2.8: UI: Disable font shadow in tabs

Julian Eisel noreply at git.blender.org
Sun Nov 25 18:37:23 CET 2018


Commit: 5e5db7db896fa6ef31736ca2e42f344c494c2e92
Author: Julian Eisel
Date:   Sun Nov 25 18:34:07 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB5e5db7db896fa6ef31736ca2e42f344c494c2e92

UI: Disable font shadow in tabs

This was used to fake a 3D look, however that doesn't work well with the new,
flat style. It just made text appear blurry.

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

M	release/scripts/addons
M	source/blender/editors/interface/interface_panel.c
M	source/blender/editors/interface/interface_widgets.c

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

diff --git a/release/scripts/addons b/release/scripts/addons
index acd39fc1b03..f89d1c9581c 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit acd39fc1b03e1f4a2d0b670189cde18db50a52e2
+Subproject commit f89d1c9581c03160485a7b4b09fa5d538331fdeb
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 3197c4a2cbf..58dc5617202 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1914,10 +1914,6 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 	ui_fontscale(&fstyle_points, aspect / (U.pixelsize * 1.1f));
 	BLF_size(fontid, fstyle_points, U.dpi);
 
-	BLF_enable(fontid, BLF_SHADOW);
-	BLF_shadow(fontid, 3, (const float[4]){1.0f, 1.0f, 1.0f, 0.25f});
-	BLF_shadow_offset(fontid, -1, -1);
-
 	BLI_assert(UI_panel_category_is_visible(ar));
 
 
@@ -2100,8 +2096,6 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 
 	BLF_disable(fontid, BLF_ROTATION);
 
-	BLF_disable(fontid, BLF_SHADOW);
-
 	if (fstyle->kerning == 1) {
 		BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT);
 	}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 0ffc40bdf9d..2d906079e21 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -3753,9 +3753,7 @@ static void widget_roundbut_exec(uiWidgetColors *wcol, rcti *rect, int state, in
 
 static void widget_tab(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
 {
-	const uiStyle *style = UI_style_get();
 	const float rad = wcol->roundness * U.widget_unit;
-	const int fontid = style->widget.uifont_id;
 	const bool is_active = (state & UI_SELECT);
 
 /* Draw shaded outline - Disabled for now, seems incorrect and also looks nicer without it imho ;) */
@@ -3797,11 +3795,6 @@ static void widget_tab(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
 	ui_draw_but_TAB_outline(rect, rad, theme_col_tab_highlight, (unsigned char *)wcol->inner);
 #endif
 
-	/* text shadow */
-	BLF_enable(fontid, BLF_SHADOW);
-	BLF_shadow(fontid, 3, (const float[4]){1.0f, 1.0f, 1.0f, 0.25f});
-	BLF_shadow_offset(fontid, 0, -1);
-
 #ifndef USE_TAB_SHADED_HIGHLIGHT
 	UNUSED_VARS(is_active, theme_col_tab_highlight);
 #endif



More information about the Bf-blender-cvs mailing list