[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34373] trunk/blender/source/blender/ editors/space_file/file_draw.c: == file browser ==

Andrea Weikert elubie at gmx.net
Mon Jan 17 21:10:19 CET 2011


Revision: 34373
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34373
Author:   elubie
Date:     2011-01-17 20:10:18 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
== 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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_file/file_draw.c

Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c	2011-01-17 19:39:25 UTC (rev 34372)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c	2011-01-17 20:10:18 UTC (rev 34373)
@@ -302,7 +302,8 @@
 	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);




More information about the Bf-blender-cvs mailing list