Row/Column uses correct axis for determining free space

This commit is contained in:
Sasha Koshka 2024-06-15 07:58:51 -04:00
parent 6d157eb9af
commit 3533ce3726

View File

@ -54,7 +54,7 @@ func (column Column) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
if expands(index) {
nExpanding ++
} else {
freeSpace -= float64(box.MinimumSize().X)
freeSpace -= float64(box.MinimumSize().Y)
}
}
expandingSize = freeSpace / float64(nExpanding)
@ -125,7 +125,7 @@ func (row Row) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
if expands(index) {
nExpanding ++
} else {
freeSpace -= float64(box.MinimumSize().Y)
freeSpace -= float64(box.MinimumSize().X)
}
}
expandingSize = freeSpace / float64(nExpanding)