-
Notifications
You must be signed in to change notification settings - Fork 614
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
view titles #30
Comments
I'd prefer to keep views as simple as possible, think on them just as buffers. In the case of needing a title, I would add another view above just with the title (one line height, you can disable borders, etc.) |
I've implemented this feature based on the PR #36 from @conejoninja. You can check it on branch view-title commit bb01d13. The main difference between my patch and the original PR is that I iterate over the title string, avoiding unnecessary iterations during the draw loop. I've also added an example with all the test cases under _examples/title.go to test long titles, overlap between views, small views with title, etc. Could you please check if it works as expected? :) |
Looks good to me, no problems so far |
Great. I've just merged it! |
hi,
is there a way to add a title to the view?
If not, that'd be nice to have, it can be in the same level as the frame like https://github.com/gizak/termui does.
The syntax could be something like this:
The text was updated successfully, but these errors were encountered: