Skip to content

Conversation

@helin24
Copy link
Member

@helin24 helin24 commented May 22, 2021

#2459 was the original attempt to implement variable font size (see for more context), but this PR uses a global variable set from main instead of setting a factor based on theme later. We were originally going to refactor some controller classes to enable passing font size through (see #2482), but this is easier and seems like a reasonable method.

const double columnWidth = 16.0;
const double verticalPadding = 10.0;
const double rowHeight = 24.0;
double get verticalPadding => 10.0 * ideTheme.fontSizeFactor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For discussion: it might be a good idea to round the verticalPadding and row height o the nearest px to ensure the ux is always in whole number of pixels unless there is a strong reason not to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable. I added a util function for this. Do you think it's necessary to restrict font sizes to reasonable min/max numbers?

@helin24 helin24 requested a review from kenzieschmoll May 24, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants