[Bf-blender-cvs] [d4fe083b356] blender2.8: Merge branch 'master' into blender2.8

Campbell Barton noreply at git.blender.org
Sat Nov 4 11:39:31 CET 2017


Commit: d4fe083b356d7967ce6d9716cd0e6ba3039d1655
Author: Campbell Barton
Date:   Sat Nov 4 21:45:52 2017 +1100
Branches: blender2.8
https://developer.blender.org/rBd4fe083b356d7967ce6d9716cd0e6ba3039d1655

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/editors/interface/interface_region_tooltip.c
index 601a2d2e11a,ace1afb79aa..6d45c5bd02b
--- a/source/blender/editors/interface/interface_region_tooltip.c
+++ b/source/blender/editors/interface/interface_region_tooltip.c
@@@ -202,25 -225,28 +226,28 @@@ static void ui_tooltip_region_draw_cb(c
  			fstyle_header.shadowalpha = 1.0f;
  			fstyle_header.word_wrap = true;
  
 +			rgb_float_to_uchar(drawcol, tip_colors[UI_TIP_LC_MAIN]);
  			UI_fontstyle_set(&fstyle_header);
- 			UI_fontstyle_draw(&fstyle_header, &bbox, data->header, drawcol);
- 
- 			/* offset to the end of the last line */
- 			xofs = data->line_geom[i].x_pos;
- 			yofs = data->lineh * (data->line_geom[i].lines - 1);
- 			bbox.xmin += xofs;
- 			bbox.ymax -= yofs;
 -			glColor3fv(tip_colors[UI_TIP_LC_MAIN]);
 -			UI_fontstyle_draw(&fstyle_header, &bbox, field->text);
++			UI_fontstyle_draw(&fstyle_header, &bbox, field->text, drawcol);
  
  			fstyle_header.shadow = 0;
- 			rgb_float_to_uchar(drawcol, tip_colors[UI_TIP_LC_ACTIVE]);
- 			UI_fontstyle_draw(&fstyle_header, &bbox, data->active_info, drawcol);
  
- 			/* undo offset */
- 			bbox.xmin -= xofs;
- 			bbox.ymax += yofs;
+ 			/* offset to the end of the last line */
+ 			if (field->text_suffix) {
+ 				float xofs = field->geom.x_pos;
+ 				float yofs = data->lineh * (field->geom.lines - 1);
+ 				bbox.xmin += xofs;
+ 				bbox.ymax -= yofs;
+ 
 -				glColor3fv(tip_colors[UI_TIP_LC_ACTIVE]);
 -				UI_fontstyle_draw(&fstyle_header, &bbox, field->text_suffix);
++				rgb_float_to_uchar(drawcol, tip_colors[UI_TIP_LC_ACTIVE]);
++				UI_fontstyle_draw(&fstyle_header, &bbox, field->text_suffix, drawcol);
+ 
+ 				/* undo offset */
+ 				bbox.xmin -= xofs;
+ 				bbox.ymax += yofs;
+ 			}
  		}
- 		else if (data->format[i].style == UI_TIP_STYLE_MONO) {
+ 		else if (field->format.style == UI_TIP_STYLE_MONO) {
  			uiFontStyle fstyle_mono = data->fstyle;
  			fstyle_mono.uifont_id = blf_mono_font;
  			fstyle_mono.word_wrap = true;
@@@ -228,8 -254,8 +255,8 @@@
  			UI_fontstyle_set(&fstyle_mono);
  			/* XXX, needed because we dont have mono in 'U.uifonts' */
  			BLF_size(fstyle_mono.uifont_id, fstyle_mono.points * U.pixelsize, U.dpi);
- 			rgb_float_to_uchar(drawcol, tip_colors[data->format[i].color_id]);
- 			UI_fontstyle_draw(&fstyle_mono, &bbox, data->lines[i], drawcol);
 -			glColor3fv(tip_colors[field->format.color_id]);
 -			UI_fontstyle_draw(&fstyle_mono, &bbox, field->text);
++			rgb_float_to_uchar(drawcol, tip_colors[field->format.color_id]);
++			UI_fontstyle_draw(&fstyle_mono, &bbox, field->text, drawcol);
  		}
  		else {
  			uiFontStyle fstyle_normal = data->fstyle;
@@@ -237,14 -263,14 +264,14 @@@
  			fstyle_normal.word_wrap = true;
  
  			/* draw remaining data */
- 			rgb_float_to_uchar(drawcol, tip_colors[data->format[i].color_id]);
++			rgb_float_to_uchar(drawcol, tip_colors[field->format.color_id]);
  			UI_fontstyle_set(&fstyle_normal);
- 			UI_fontstyle_draw(&fstyle_normal, &bbox, data->lines[i], drawcol);
 -			glColor3fv(tip_colors[field->format.color_id]);
 -			UI_fontstyle_draw(&fstyle_normal, &bbox, field->text);
++			UI_fontstyle_draw(&fstyle_normal, &bbox, field->text, drawcol);
  		}
  
- 		bbox.ymax -= data->lineh * data->line_geom[i].lines;
+ 		bbox.ymax -= data->lineh * field->geom.lines;
  
- 		if ((i + 1 != data->totline) && data->format[i + 1].is_pad) {
+ 		if (field_next && field_next->format.is_pad) {
  			bbox.ymax -= data->lineh * (UI_TIP_PAD_FAC - 1);
  		}
  	}



More information about the Bf-blender-cvs mailing list