From d2a8e6d8fab0e391c0e506c81b999e5f8c41c4b8 Mon Sep 17 00:00:00 2001 From: citrons Date: Wed, 4 Jun 2025 12:21:15 -0500 Subject: inner boxes now unlimited by scroll container size --- tui/layout.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tui/layout.go') 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) -- cgit v1.2.3