Fix T96267: Sidebar Tab Font Size Correction

Correction to the calculation of font size used for the tabs on the
Sidebar so that they are always the same size as other content on the
panel.

See D14322 for more details.

Differential Revision: https://developer.blender.org/D14322

Reviewed by Brecht Van Lommel
This commit is contained in:
Harley Acheson 2022-03-13 17:08:15 -07:00
parent 4ec1c8bc9c
commit b959f603da
Notes: blender-bot 2023-02-14 08:38:14 +01:00
Referenced by issue #96267, N-Panel font size in 3.1 too big
Referenced by issue #85689, Start up hangs when a disconnected mapped network drive is present on Windows
1 changed files with 2 additions and 3 deletions

View File

@ -1357,9 +1357,8 @@ void UI_panel_category_draw_all(ARegion *region, const char *category_id_active)
BLF_enable(fontid, BLF_ROTATION);
BLF_rotation(fontid, M_PI_2);
// UI_fontstyle_set(&style->widget);
ui_fontscale(&fstyle_points, aspect / (U.pixelsize * 1.1f));
BLF_size(fontid, fstyle_points, U.dpi);
ui_fontscale(&fstyle_points, aspect);
BLF_size(fontid, fstyle_points * U.pixelsize, U.dpi);
/* Check the region type supports categories to avoid an assert
* for showing 3D view panels in the properties space. */