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
This commit is contained in:
Harley Acheson
2021-03-25 08:34:53 -07:00
parent 5ebe74e779
commit 0f13bded46

View File

@@ -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() *