From 43d49a0dbb276bd1806e172132b24174d5187292 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sun, 24 May 2020 19:15:45 +0200 Subject: [PATCH] Fixed bug where spacing was not respecting a fixed width/height when asking its proxied control for its desired size. --- ui/spacing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/spacing.go b/ui/spacing.go index 6e4961c..f3c2c98 100644 --- a/ui/spacing.go +++ b/ui/spacing.go @@ -81,7 +81,7 @@ func (s *Spacing) Center() { } func (s *Spacing) DesiredSize(ctx Context, size geom.PointF32) geom.PointF32 { - var content = s.Proxy.DesiredSize(ctx, size) + var content = s.Proxy.DesiredSize(ctx, geom.PtF32(s.Width.Zero(size.X), s.Height.Zero(size.Y))) var w, h = s.Width.Zero(content.X), s.Height.Zero(content.Y) var margin = func(l *Length) float32 { var v = l.Value()