[Bf-blender-cvs] [b959f603da4] master: Fix T96267: Sidebar Tab Font Size Correction

Harley Acheson noreply at git.blender.org
Mon Mar 14 01:09:28 CET 2022


Commit: b959f603da4532cd18618a31f091c40bff88e442
Author: Harley Acheson
Date:   Sun Mar 13 17:08:15 2022 -0700
Branches: master
https://developer.blender.org/rBb959f603da4532cd18618a31f091c40bff88e442

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

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

M	source/blender/editors/interface/interface_panel.c

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

diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index c7f2eb230cb..87bfb7ca0f7 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -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. */



More information about the Bf-blender-cvs mailing list