== 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user