From f6d73fdfeebdf97bc956a4297b720e0ad7a3264e Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Mon, 17 Jan 2011 20:10:18 +0000 Subject: [PATCH] == file browser == bring back nice shortening of filenames in thumbnail view, shortening at front and end is confusing. - adds ... at the end to indicate that the filename has been shortened - also cuts off at the end and not at both front and end now Note: maybe this can be moved into button code or so in the future, but for now should work. --- source/blender/editors/space_file/file_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 98547dbe798..e9e036a65cb 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -302,7 +302,8 @@ static void file_draw_string(int sx, int sy, const char* string, float width, in fs.align = align; BLI_strncpy(fname,string, FILE_MAXFILE); - + file_shorten_string(fname, width+1.0, 0); + /* no text clipping needed, uiStyleFontDraw does it but is a bit too strict (for buttons it works) */ rect.xmin = sx; rect.xmax = sx + ceil(width+4.0f);