Row/Column uses correct axis for determining free space
This commit is contained in:
parent
6d157eb9af
commit
3533ce3726
@ -54,7 +54,7 @@ func (column Column) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
|||||||
if expands(index) {
|
if expands(index) {
|
||||||
nExpanding ++
|
nExpanding ++
|
||||||
} else {
|
} else {
|
||||||
freeSpace -= float64(box.MinimumSize().X)
|
freeSpace -= float64(box.MinimumSize().Y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expandingSize = freeSpace / float64(nExpanding)
|
expandingSize = freeSpace / float64(nExpanding)
|
||||||
@ -125,7 +125,7 @@ func (row Row) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
|||||||
if expands(index) {
|
if expands(index) {
|
||||||
nExpanding ++
|
nExpanding ++
|
||||||
} else {
|
} else {
|
||||||
freeSpace -= float64(box.MinimumSize().Y)
|
freeSpace -= float64(box.MinimumSize().X)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expandingSize = freeSpace / float64(nExpanding)
|
expandingSize = freeSpace / float64(nExpanding)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user