Commit: 0f13bded46feb7f16c21e95321a1a07998930c19
Author: Harley Acheson
Date:   Thu Mar 25 08:34:53 2021 -0700
Branches: master
https://developer.blender.org/rB0f13bded46feb7f16c21e95321a1a07998930c19

Fix T86852: Allow Font Style Changes to Affect Spreadsheet Text Size

Replacing a hard-coded font size with font style widget size so it can be set 
by user.

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

Reviewed by Dalai Felinto

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

M       source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc

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

diff --git 
a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc 
b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
index 46760c0dd4e..396767e96d9 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
@@ -41,7 +41,7 @@ class ColumnLayoutDrawer : public SpreadsheetDrawer {
 
     const int fontid = UI_style_get()->widget.uifont_id;
     /* Use a consistent font size for the width calculation. */
-    BLF_size(fontid, 11 * U.pixelsize, U.dpi);
+    BLF_size(fontid, UI_style_get_dpi()->widget.points * U.pixelsize, U.dpi);
 
     /* The width of the index column depends on the maximum row index. */
     left_column_width = std::to_string(std::max(0, column_layout_.tot_rows - 
1)).size() *

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to