From 8f17c02634d1acd2bccff0ca9ad715f5216e4012 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Thu, 11 Apr 2019 20:03:26 +0200 Subject: [PATCH] Fixed incorrect bounds being returned by Overflow control. --- ui/overflow.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/overflow.go b/ui/overflow.go index 16a1e36..75af3d0 100644 --- a/ui/overflow.go +++ b/ui/overflow.go @@ -86,6 +86,8 @@ func (o *overflow) Arrange(ctx Context, bounds geom.RectangleF32, offset geom.Po } } +func (o *overflow) Bounds() geom.RectangleF32 { return o.bounds } + func (o *overflow) DesiredSize(ctx Context) geom.PointF32 { return geom.PtF32(geom.NaN32(), geom.NaN32()) } @@ -119,7 +121,7 @@ func (o *overflow) Render(ctx Context) { var renderer = ctx.Renderer() if o.Background != nil { - ctx.Renderer().FillRectangle(o.bounds, o.Background) + renderer.FillRectangle(o.bounds, o.Background) } var content = o.Content.Bounds()