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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-03 17:12:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-03 17:12:47 +0400
commit12a78aceee0bcf7d2fc517f25fcb01b5a7465958 (patch)
tree6d101ff7a9a7c6b88bc4ce8ebc5c61d75d20f223
parent80d94babe0ceca36f8ab6759c3321b1e7b1897d0 (diff)
fix [#27218] Tooltip text renders incorrectly.
-rw-r--r--source/blender/editors/interface/interface_regions.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index aa5499110e6..c3ecbd6929c 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -485,7 +485,13 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
data->fstyle.align= UI_STYLE_TEXT_CENTER;
uiStyleFontSet(&data->fstyle);
- h= BLF_height(data->fstyle.uifont_id, data->lines[0]);
+ /* clipping is very strict & gives problems in some cases [#27218]
+ * use the tallest line height. */
+ h= 0;
+ for(a=0; a<data->totline; a++) {
+ int h_tmp= BLF_height(data->fstyle.uifont_id, data->lines[a]);
+ h= MAX2(h, h_tmp);
+ }
for(a=0, fontw=0, fonth=0; a<data->totline; a++) {
w= BLF_width(data->fstyle.uifont_id, data->lines[a]);