diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-27 18:15:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-27 18:25:55 +0300 |
commit | c5a8a4e9d8bda11cd8314473b190189fd1303c98 (patch) | |
tree | cbfa3317dc6c90f57fb4fd544cbf080487ea7e0c /source/blender/editors/space_file/file_draw.c | |
parent | be4d34ca863757528deb9968578045737fecf868 (diff) |
Fix mismatch in strings length compute in filebrowser, leading to annoying '...' in longest filename.
We must take kerning into account everywhere! Note this will disappear in upcomming filebrowser
refactor anyway.
Reported through IRC by Pablo (venomgfx), thanks.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 2bd92b1e207..0a9a12efc0b 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -310,7 +310,7 @@ static void file_draw_string(int sx, int sy, const char *string, float width, in fs.align = align; BLI_strncpy(fname, string, FILE_MAXFILE); - UI_text_clip_middle_ex(&fs, fname, width + 1.0f, UI_DPI_ICON_SIZE, sizeof(fname), NULL); + UI_text_clip_middle_ex(&fs, fname, width, UI_DPI_ICON_SIZE, sizeof(fname), NULL); /* no text clipping needed, UI_fontstyle_draw does it but is a bit too strict (for buttons it works) */ rect.xmin = sx; |