-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a line-height of 1.3x for the default text styles (#587)
* Use a line-height of 1.3x for the default text styles It looks like Swing uses a line height that is 1.3 times the font size, but that is not expressed anywhere I could find. I got the value by experimentation and pixel counting, like a proper DF review would 🙃 Using this value seems to work at both default and h[0-5] text sizes. Having a non-default line height is a bit of a pain for users, since they need to remember updating the line height too when they customize the font size in a text style; however, we can't do anything about it, and in general, folks should stick to the predefined text styles. To help, we now provide a `TextStyle.copyWithSize()` function that automatically sets the correct line height, making this slightly less painful. * Actually use the line height constant in the bridge Also solves the issue that we were ignoring the passed in line height; now we use the default only as fallback if a height is not passed in.
- Loading branch information
Showing
8 changed files
with
246 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.