From 0f13bded46feb7f16c21e95321a1a07998930c19 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Thu, 25 Mar 2021 08:34:53 -0700 Subject: 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 --- source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_spreadsheet') 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() * -- cgit v1.2.3