-
Notifications
You must be signed in to change notification settings - Fork 364
Use font size from IDE theme #3054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/devtools_app/lib/src/config_specific/ide_theme/ide_theme.dart
Outdated
Show resolved
Hide resolved
| const double columnWidth = 16.0; | ||
| const double verticalPadding = 10.0; | ||
| const double rowHeight = 24.0; | ||
| double get verticalPadding => 10.0 * ideTheme.fontSizeFactor(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
#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.