[Bf-blender-cvs] [ebbef0a3205] cycles_oneapi: File Browser UI: Use "Widget" font style instead of "Widget Label"

Julian Eisel noreply at git.blender.org
Wed Jun 29 10:38:37 CEST 2022


Commit: ebbef0a3205b4645b5ced0bfd9cb1d23c1c5bde5
Author: Julian Eisel
Date:   Mon Jun 27 16:18:57 2022 +0200
Branches: cycles_oneapi
https://developer.blender.org/rBebbef0a3205b4645b5ced0bfd9cb1d23c1c5bde5

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.

===================================================================

M	source/blender/editors/space_file/file_draw.c

===================================================================

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 0e2b98ca349..f3359336b14 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -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;



More information about the Bf-blender-cvs mailing list