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 {
|
func ceilDiv (x, y int) int {
|
||||||
|
if y == 0 { return 0 }
|
||||||
return int(math.Ceil(float64(x) / float64(y)))
|
return int(math.Ceil(float64(x) / float64(y)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Grid) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
func (this *Grid) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
||||||
// TODO
|
return this.MinimumSize(hints, boxes).Y
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Grid) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
func (this *Grid) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
||||||
// TODO
|
return this.MinimumSize(hints, boxes).X
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user