Some internal layouts return recommended sizes
This commit is contained in:
parent
3533ce3726
commit
23fb28ce5c
@ -335,12 +335,12 @@ func (this scrollbarLayout) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
|
||||
}
|
||||
|
||||
func (this scrollbarLayout) RecommendedHeight (tomo.LayoutHints, []tomo.Box, int) int {
|
||||
return 0
|
||||
func (this scrollbarLayout) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
||||
return this.MinimumSize(hints, boxes).X
|
||||
}
|
||||
|
||||
func (this scrollbarLayout) RecommendedWidth (tomo.LayoutHints, []tomo.Box, int) int {
|
||||
return 0
|
||||
func (this scrollbarLayout) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
||||
return this.MinimumSize(hints, boxes).Y
|
||||
}
|
||||
|
||||
func (this scrollbarLayout) viewportContentRatio () float64 {
|
||||
|
@ -184,12 +184,12 @@ func (this *scrollContainerLayout) Arrange (hints tomo.LayoutHints, boxes []tomo
|
||||
}
|
||||
}
|
||||
|
||||
func (this *scrollContainerLayout) RecommendedHeight (tomo.LayoutHints, []tomo.Box, int) int {
|
||||
return 0
|
||||
func (this *scrollContainerLayout) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
||||
return this.MinimumSize(hints, boxes).X
|
||||
}
|
||||
|
||||
func (this *scrollContainerLayout) RecommendedWidth (tomo.LayoutHints, []tomo.Box, int) int {
|
||||
return 0
|
||||
func (this *scrollContainerLayout) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
||||
return this.MinimumSize(hints, boxes).Y
|
||||
}
|
||||
|
||||
func max (x, y int) int {
|
||||
|
Loading…
Reference in New Issue
Block a user