Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-01-10 14:14:03 +0300
committerJeroen Bakker <jeroen@blender.org>2020-01-10 14:14:03 +0300
commit98671061993e2d053514a4df0cce24b63645c049 (patch)
tree9ca64c630b359e855c99d4bb81289d4e9b84cff8 /source/blender/windowmanager
parent95200045f312dd90851f8dfa4c7601bec762a823 (diff)
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.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c3
1 files changed, 3 insertions, 0 deletions
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);