From 4da050674e2c6a0ecc7d50733f7de8df3e77ee73 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 22 Apr 2015 08:15:05 +0200 Subject: Fix T44470: File Selection sometimes surpresses last Character. Tweak hack of `file_draw_string()` (there may be better solution, but not worth spending time on this, the whole filebrowser drawing code is to be rewritten anyway). --- source/blender/editors/space_file/file_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index a6f3a73841e..9763efbc7b5 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -307,10 +307,10 @@ static void file_draw_string(int sx, int sy, const char *string, float width, in /* no text clipping needed, UI_fontstyle_draw does it but is a bit too strict (for buttons it works) */ rect.xmin = sx; - rect.xmax = (int)(sx + ceil(width + 4.0f)); + rect.xmax = (int)(sx + ceil(width + 5.0f / UI_DPI_FAC)); rect.ymin = sy - height; rect.ymax = sy; - + UI_fontstyle_draw(&fs, &rect, fname); } -- cgit v1.2.3