Fixed bug in StackPanel

- Children now get actual bounds, might be outside of the parent's bounds.
This commit is contained in:
Sander Schobers 2019-03-13 20:18:15 +01:00
parent 4d518849e5
commit a6718e335d

View File

@ -31,8 +31,6 @@ func (p *StackPanel) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.
} else {
height = remainder / float32(stretch)
}
} else if childOffset+height > bounds.Dy() {
height = bounds.Dy() - childOffset
}
var child = geom.RectF32(bounds.Min.X, bounds.Min.Y+childOffset, bounds.Max.X, bounds.Min.Y+childOffset+height)
p.Children[i].Arrange(ctx, p.Orientation.FlipRect(child), offset)