Fixed bug where spacing was not respecting a fixed width/height when asking its proxied control for its desired size.

This commit is contained in:
Sander Schobers 2020-05-24 19:15:45 +02:00
parent 352984d6d9
commit 43d49a0dbb

View File

@ -81,7 +81,7 @@ func (s *Spacing) Center() {
} }
func (s *Spacing) DesiredSize(ctx Context, size geom.PointF32) geom.PointF32 { 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 w, h = s.Width.Zero(content.X), s.Height.Zero(content.Y)
var margin = func(l *Length) float32 { var margin = func(l *Length) float32 {
var v = l.Value() var v = l.Value()