-
Notifications
You must be signed in to change notification settings - Fork 62
Add BorderLabels to Border widget #214
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
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.
This is a good feature to add. Approach is good but you just need to make sure you are working on graphemes vs bytes.
- used Grapheme Iterator instead of old range based loop. - used `ctx.stringWidth()` instead of `text.len`. - added empty label guard.
@rockorager I have made the changes requested. |
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.
One remaining issue on the loop.
@rockorager Done. (I think I need to get a good grasp on grapheme iterator) |
Added BorderLabels to Border Widget to show text inline along the borders. Currently, it has the following alignment options,
Here is a screenshot,

Example code snippet,