Compare commits

..

2 Commits

3 changed files with 10 additions and 10 deletions

View File

@ -54,7 +54,7 @@ func (column Column) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
if expands(index) { if expands(index) {
nExpanding ++ nExpanding ++
} else { } else {
freeSpace -= float64(box.MinimumSize().X) freeSpace -= float64(box.MinimumSize().Y)
} }
} }
expandingSize = freeSpace / float64(nExpanding) expandingSize = freeSpace / float64(nExpanding)
@ -125,7 +125,7 @@ func (row Row) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
if expands(index) { if expands(index) {
nExpanding ++ nExpanding ++
} else { } else {
freeSpace -= float64(box.MinimumSize().Y) freeSpace -= float64(box.MinimumSize().X)
} }
} }
expandingSize = freeSpace / float64(nExpanding) expandingSize = freeSpace / float64(nExpanding)

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 {