Bugfix: Transform autokey warning indicator text was getting clipped prematurely

After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.
This commit is contained in:
Joshua Leung 2013-03-21 11:14:53 +00:00
parent 8a7ce9c924
commit 67e54eb819
2 changed files with 2 additions and 1 deletions

@ -619,6 +619,7 @@ void BLF_width_and_height_default(const char *str, float *width, float *height)
return; return;
} }
BLF_size(global_font_default, global_font_points, global_font_dpi);
BLF_width_and_height(global_font_default, str, width, height); BLF_width_and_height(global_font_default, str, width, height);
} }

@ -1685,7 +1685,7 @@ static void drawTransformView(const struct bContext *C, ARegion *UNUSED(ar), voi
static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar) static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar)
{ {
rcti rect; rcti rect;
const char *printable = IFACE_("Auto Keying On"); const char printable[] = IFACE_("Auto Keying On");
float printable_size[2]; float printable_size[2];
int xco, yco; int xco, yco;