-
-
Notifications
You must be signed in to change notification settings - Fork 832
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
refactor: Use constants from Twips
where appropriate
#19061
Conversation
For some reason, reading |
Yeah... That's a bit confusing. I don't have a proposal of a better name though... :/ |
I had the same confusion and was thinking of bringing it up too. How about ONEPX? (Or ONE_PX if you prefer) |
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.
Bikeshedding aside, LGTM
I like |
Twips::ONE was ambiguous, because it suggested it's 1 twips, but it was 1 px instead.
Similarly to Twips::ONE_PX, this name change makes it obvious it's half a pixel, not half a twip.
It's a refactor that replaces
Twips
instantiations with respective constants. Some instantiations in tests (byTwips::new
) were left intact as they seem to focus on the pure numerical value instead of semantically the number of twips.