Skip to content
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

TextFormatter only draw the text width without fill the remaining bounds width with spaces. #2002

Closed
BDisp opened this issue Sep 10, 2022 · 0 comments · Fixed by #2003
Closed
Labels

Comments

@BDisp
Copy link
Collaborator

BDisp commented Sep 10, 2022

If a view width is bigger than the text length and we needed to fill the remaining with spaces. This allows any view to leverage all the text alignment feature.
Another advantage of this fill option is that isn't needed to clear the area before write. The View.Redraw currently use two methods to write to the screen, Clear and Draw. Using only the Draw method is possible to clear what is to be cleared and write what have to be write, increasing the performance.

@tig tig added the bug label Sep 15, 2022
@tig tig closed this as completed in #2003 Sep 15, 2022
tig added a commit that referenced this issue Sep 15, 2022
…2003)

* Added feature to fill the remaining width with spaces.

* Removing unnecessary parameter.

* Fixes a typo.

* Unit test rewritten to explain better main feature of this PR.

Co-authored-by: Tig Kindel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants