Fix issues with grid layout
This commit is contained in:
parent
1e8df2392d
commit
1efb946953
@ -106,15 +106,14 @@ func expand (hints tomo.LayoutHints, sizes []int, space int, expands func (int)
|
||||
}
|
||||
|
||||
func ceilDiv (x, y int) int {
|
||||
if y == 0 { return 0 }
|
||||
return int(math.Ceil(float64(x) / float64(y)))
|
||||
}
|
||||
|
||||
func (this *Grid) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
||||
// TODO
|
||||
return 0
|
||||
return this.MinimumSize(hints, boxes).Y
|
||||
}
|
||||
|
||||
func (this *Grid) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
||||
// TODO
|
||||
return 0
|
||||
return this.MinimumSize(hints, boxes).X
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user