Some internal layouts return recommended sizes

This commit is contained in:
Sasha Koshka 2024-06-15 09:27:35 -04:00
parent 3533ce3726
commit 23fb28ce5c
2 changed files with 8 additions and 8 deletions

View File

@ -335,12 +335,12 @@ func (this scrollbarLayout) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
} }
func (this scrollbarLayout) RecommendedHeight (tomo.LayoutHints, []tomo.Box, int) int { func (this scrollbarLayout) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
return 0 return this.MinimumSize(hints, boxes).X
} }
func (this scrollbarLayout) RecommendedWidth (tomo.LayoutHints, []tomo.Box, int) int { func (this scrollbarLayout) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
return 0 return this.MinimumSize(hints, boxes).Y
} }
func (this scrollbarLayout) viewportContentRatio () float64 { func (this scrollbarLayout) viewportContentRatio () float64 {

View File

@ -184,12 +184,12 @@ func (this *scrollContainerLayout) Arrange (hints tomo.LayoutHints, boxes []tomo
} }
} }
func (this *scrollContainerLayout) RecommendedHeight (tomo.LayoutHints, []tomo.Box, int) int { func (this *scrollContainerLayout) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
return 0 return this.MinimumSize(hints, boxes).X
} }
func (this *scrollContainerLayout) RecommendedWidth (tomo.LayoutHints, []tomo.Box, int) int { func (this *scrollContainerLayout) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
return 0 return this.MinimumSize(hints, boxes).Y
} }
func max (x, y int) int { func max (x, y int) int {