[Bf-blender-cvs] [98671061993] blender-v2.82-release: Fix T71491: Sculpt Brush Text Color
Jeroen Bakker
noreply at git.blender.org
Fri Jan 10 12:16:49 CET 2020
Commit: 98671061993e2d053514a4df0cce24b63645c049
Author: Jeroen Bakker
Date: Fri Jan 10 12:14:03 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB98671061993e2d053514a4df0cce24b63645c049
Fix T71491: Sculpt Brush Text Color
When text drawing is disabled in the viewport the color of the sculpt
brh is set to the last used one. In th Light theme this is black what
makes it totally not visible.
This change will render the brush text using `TEXT_HI` as this is the
last one set when the text overlay is on.
===================================================================
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 9df27ca71f0..4ec62ff6d62 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2210,6 +2210,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void
float strwidth, strheight;
float r1 = 0.0f, r2 = 0.0f, rmin = 0.0, tex_radius, alpha;
float zoom[2], col[4] = {1.0f, 1.0f, 1.0f, 1.0f};
+ float text_color[4];
switch (rc->subtype) {
case PROP_NONE:
@@ -2336,6 +2337,8 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void
immUnbindProgram();
BLF_size(fontid, 1.75f * fstyle_points * U.pixelsize, U.dpi);
+ UI_GetThemeColor4fv(TH_TEXT_HI, text_color);
+ BLF_color4fv(fontid, text_color);
/* draw value */
BLF_width_and_height(fontid, str, strdrawlen, &strwidth, &strheight);
More information about the Bf-blender-cvs
mailing list