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.
This commit is contained in:
@@ -973,6 +973,10 @@ float UI_text_clip_middle_ex(
|
||||
{
|
||||
float strwidth;
|
||||
|
||||
/* Add some epsilon to OK width, avoids 'ellipsing' text that nearly fits!
|
||||
* Better to have a small piece of the last char cut out, than two remaining chars replaced by an allipsis... */
|
||||
okwidth += 1.0f + UI_DPI_FAC;
|
||||
|
||||
BLI_assert(str[0]);
|
||||
|
||||
/* need to set this first */
|
||||
|
||||
Reference in New Issue
Block a user