summaryrefslogtreecommitdiff
path: root/tui/layout.go
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2025-06-04 12:21:15 -0500
committercitrons <citrons@mondecitronne.com>2025-06-07 16:02:18 -0500
commitd2a8e6d8fab0e391c0e506c81b999e5f8c41c4b8 (patch)
treeb186e270bf118580107e0a496fc59a7866870ad6 /tui/layout.go
parentde2aaa40b135e8bbe944bbc5fca45105c9c7048a (diff)
inner boxes now unlimited by scroll container size
Diffstat (limited to 'tui/layout.go')
-rw-r--r--tui/layout.go7
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)