BoxQuerier returns box minimum size as a fallback for reccomended sizes
This commit is contained in:
parent
832d7e02ef
commit
33969f45e9
@ -20,6 +20,7 @@ func (querier boxQuerier) RecommendedWidth (index int, height int) int {
|
||||
if box, ok := box.(anyContentBox); ok {
|
||||
return box.recommendedWidth(height)
|
||||
}
|
||||
return box.minimumSize().X
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -29,6 +30,7 @@ func (querier boxQuerier) RecommendedHeight (index int, width int) int {
|
||||
if box, ok := box.(anyContentBox); ok {
|
||||
return box.recommendedHeight(width)
|
||||
}
|
||||
return box.minimumSize().Y
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user