From a6718e335d9d3a036ae4ffece88b92469cecd35d Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Wed, 13 Mar 2019 20:18:15 +0100 Subject: [PATCH] Fixed bug in StackPanel - Children now get actual bounds, might be outside of the parent's bounds. --- ui/stackpanel.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/stackpanel.go b/ui/stackpanel.go index 7c00cda..f734c1e 100644 --- a/ui/stackpanel.go +++ b/ui/stackpanel.go @@ -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)