[Bf-blender-cvs] [4da0506] master: Fix T44470: File Selection sometimes surpresses last Character.

Bastien Montagne noreply at git.blender.org
Wed Apr 22 08:16:34 CEST 2015


Commit: 4da050674e2c6a0ecc7d50733f7de8df3e77ee73
Author: Bastien Montagne
Date:   Wed Apr 22 08:15:05 2015 +0200
Branches: master
https://developer.blender.org/rB4da050674e2c6a0ecc7d50733f7de8df3e77ee73

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).

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

M	source/blender/editors/space_file/file_draw.c

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

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index a6f3a73..9763efb 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);
 }




More information about the Bf-blender-cvs mailing list