diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-04 12:21:15 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:18 -0500 |
| commit | d2a8e6d8fab0e391c0e506c81b999e5f8c41c4b8 (patch) | |
| tree | b186e270bf118580107e0a496fc59a7866870ad6 | |
| parent | de2aaa40b135e8bbe944bbc5fca45105c9c7048a (diff) | |
inner boxes now unlimited by scroll container size
| -rw-r--r-- | tui/layout.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tui/layout.go b/tui/layout.go index 3b70881..9dea37d 100644 --- a/tui/layout.go +++ b/tui/layout.go @@ -146,7 +146,10 @@ func (b *Box) computeChildrenSizes(axis int) { } func (b *Box) solve(axis int) { - if b.Dir.axis() == axis && !b.Overflow { + switch { + case b.Dir.axis() == axis && b.Overflow: + break + case b.Dir.axis() == axis: size := b.marginsSize(axis) nFlexible := 0 for _, c := range b.children { @@ -178,7 +181,7 @@ func (b *Box) solve(axis int) { c.computedSize[axis] -= shave excess -= shave } - } else { + default: maxSize := b.computedSize[axis] - b.marginsSize(axis) for _, c := range b.children { c.computedSize[axis] = min(c.computedSize[axis], maxSize) |
