File Browser UI: Use "Widget" font style instead of "Widget Label"

It didn't make much sense to use the "Widget Label" font style here,
since this is just regular text, not labels for widgets. Checked with
@pablovazquez and we agreed on using the "Widget" font style instead.

Also fixes a mismatch where we used the "Widget Label" font style for
drawing, but the "Widget" font style for string width calculations.
Fixes T99207.
This commit is contained in:
Julian Eisel
2022-06-27 16:18:57 +02:00
parent 64a3a11e19
commit 6f7171525b

View File

@@ -202,7 +202,7 @@ static void file_draw_string(int sx,
}
const uiStyle *style = UI_style_get();
fs = style->widgetlabel;
fs = style->widget;
BLI_strncpy(fname, string, FILE_MAXFILE);
UI_text_clip_middle_ex(&fs, fname, width, UI_DPI_ICON_SIZE, sizeof(fname), '\0');
@@ -245,7 +245,7 @@ static void file_draw_string_multiline(int sx,
}
const uiStyle *style = UI_style_get();
int font_id = style->widgetlabel.uifont_id;
int font_id = style->widget.uifont_id;
int len = strlen(string);
rcti textbox;