-
Notifications
You must be signed in to change notification settings - Fork 2
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
Vertical and Horizontal space around the text are used additional values #1
Comments
Those are the base values to use when fontSize, or text height, is too small. 24% or 12% of small text height values doesn't look good. You can test it out by removing static values and use 12.sp or less. If you can come up with better formula for paddings for any size of text or paddings, feel free to open a PR. |
6 and 8 are used also by that reason ? |
Yes, but i think it would be better to changed them with |
I looked into this and your "magic" values would work only with default Android fonts. Then
I used all space as a left and right padding to expand a rect |
As I see you use some additional values to measure vertical and horizontal padding
val verticalSpaceAroundText = (textHeight * .12f + 6 + paddingVertical).toInt()
What is 6 and .12 here ?
Same for
val horizontalSpaceAroundText = ((textHeight * .24f) + 8 + paddingHorizontal).toInt()
What is 8 and .24 here ?
The text was updated successfully, but these errors were encountered: