Use font size from IDE theme#3054
Merged
helin24 merged 12 commits intoflutter:masterfrom May 24, 2021
Merged
Conversation
jacob314
reviewed
May 24, 2021
packages/devtools_app/lib/src/config_specific/ide_theme/ide_theme.dart
Outdated
Show resolved
Hide resolved
jacob314
reviewed
May 24, 2021
| const double columnWidth = 16.0; | ||
| const double verticalPadding = 10.0; | ||
| const double rowHeight = 24.0; | ||
| double get verticalPadding => 10.0 * ideTheme.fontSizeFactor(); |
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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?
kenzieschmoll
approved these changes
May 24, 2021
This was referenced May 24, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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.