-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement symmetric text padding from edges #46
base: main
Are you sure you want to change the base?
Conversation
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
} | ||
|
||
yearConfig := textRenderConfig{ | ||
renderConfig: renderConfig{ | ||
startX: innerWidth * yearPosition, | ||
startX: innerWidth*(1-textPadding) - 75, |
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.
By chosing 75
, It exaclty aligns with right side of the cuboid.
The number was chosen by hit-and-trial method.
Thanks @mkhuzaima for the contribution, it's appreciated! ✨ And your patience for me to review! I've been taking a look through, and it looks like a great start! I've been thinking about an additional tweak that could be made (I realised I wasn't as clear as I could have been in my original issue!) I think we're looking to balance the space between the Invertocat on the left hand edge with the text on the right hand edge. In the current implementation, the distance between left edge and username is the same as the right edge and year, it looks a little unbalanced compared to the left hand side. So perhaps something like, the distances between these items should be the same:
What do you think? 😄 |
Thanks so much for reviewing my contribution and for the thoughtful feedback—I really appreciate it! 😊 I see what you mean about balancing the spacing to make it feel more consistent. That’s a great idea, and I’ll work on tweaking it to align better with what you described. I’ll update the PR as soon as I’ve got it sorted! Thanks again for your time and guidance—it’s been great working on this! |
Username and year are now have same padding from the edges. Padding is kept 10% for now, and, is customizable.
I have used alignment alongwith DrawStringWrapped method, to align username and year on the left and right side of
gg.Context
respectively.Fixes #12.