Layouts now conform to the new API

This commit is contained in:
Sasha Koshka
2023-01-19 16:54:49 -05:00
parent c813463bb4
commit 6f6591f0d0
5 changed files with 16 additions and 12 deletions

View File

@@ -324,7 +324,7 @@ func (element *Container) HandleSelection (direction tomo.SelectionDirection) (o
}
func (element *Container) FlexibleHeightFor (width int) (height int) {
return element.layout.MinimumHeightFor(element.children, width)
return element.layout.FlexibleHeightFor(element.children, width)
}
func (element *Container) OnFlexibleHeightChange (callback func ()) {
@@ -431,7 +431,7 @@ func (element *Container) childSelectionRequestCallback (
func (element *Container) updateMinimumSize () {
width, height := element.layout.MinimumSize(element.children)
if element.flexible {
height = element.layout.MinimumHeightFor(element.children, width)
height = element.layout.FlexibleHeightFor(element.children, width)
}
element.core.SetMinimumSize(width, height)
}