diff --git a/layout/layout.go b/layout/layout.go index f36dbd5c..0b91a21b 100644 --- a/layout/layout.go +++ b/layout/layout.go @@ -211,10 +211,10 @@ type Spacer struct { func (s Spacer) Layout(gtx Context) Dimensions { return Dimensions{ - Size: image.Point{ + Size: gtx.Constraints.Constrain(image.Point{ X: gtx.Dp(s.Width), Y: gtx.Dp(s.Height), - }, + }), } }