mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[GH-ISSUE #213] Can I have a row as tall as one character? #115
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fenollp on GitHub (May 23, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/213
Originally assigned to: @mum4k on GitHub.
I have adapted the demo to use this layout:
I'm trying to get the bottom 2 gauges to always be as tall as a the XX% progress they contain (= as tall as a character).
But when I change my terminal zoom this eventually ends as text smaller than the bar and no longer vertically centered.
Any plans on adding something akin to
grid.RowHeightEM(from CSS: https://www.w3schools.com/cssref/css_units.asp)@mum4k commented on GitHub (May 24, 2019):
Hi @fenollp, thanks for pointing this out. PR #204 recently added support for fixed size container splits. Note this hasn't been released yet and is available in the devel branch only. However the PR added the support only to the binary tree layout. It should be trivial to add this to the grid layout as well. I will try to squeeze this in before the next release.
Do note that Termdash currently only supports a full-screen mode. So even with fixed size splits - the last row (the last container) will always dynamically adjust to the remaining height of the screen. If I understand your use case correctly - this should not be a problem.
@mum4k commented on GitHub (May 24, 2019):
This has now been pushed into the devel branch.
Please give it a try and let me know if you see anything missing.
@fenollp commented on GitHub (May 24, 2019):
It works quite well, as long as I fix the top container height which breaks as soon as I resize the window:
@mum4k commented on GitHub (May 24, 2019):
Thanks for coming back @fenollp,
sorry not sure what you mean by "which breaks as soon as I resize the window". Does this mean we still have an issue we should improve on?
@fenollp commented on GitHub (May 25, 2019):
Actually yes, now that I'm trying the above code on a different terminal & screen resolution it appears
grid.RowHeightFixed(1, grid.Widget(w.gauge))can take more height than the height of the characters it contains. It is fine on OSX though.