From 1815225faa75eb64e83fdc9f066fcd6339502d52 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 2 Dec 2013 20:33:45 +1100 Subject: Blender Font (BLF): add length argument to string width/height functions This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR --- source/blender/editors/space_file/filesel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_file/filesel.c') diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index ff0add36bdc..d329d505138 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -435,7 +435,7 @@ float file_string_width(const char *str) { uiStyle *style = UI_GetStyle(); uiStyleFontSet(&style->widget); - return BLF_width(style->widget.uifont_id, str); + return BLF_width(style->widget.uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); } float file_font_pointsize(void) -- cgit v1.2.3