From 60365b0235276720a3c56ea43ddcb8b1b566ac0a Mon Sep 17 00:00:00 2001 From: Larry Clapp Date: Tue, 24 Mar 2020 10:35:35 -0400 Subject: [PATCH] material: allow checkboxes without labels --- widget/material/checkable.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widget/material/checkable.go b/widget/material/checkable.go index 2bc13416..3a80a806 100644 --- a/widget/material/checkable.go +++ b/widget/material/checkable.go @@ -53,6 +53,9 @@ func (c *checkable) layout(gtx layout.Context, checked bool) layout.Dimensions { }), layout.Rigid(func(gtx layout.Context) layout.Dimensions { + if c.Label == "" { + return + } gtx.Constraints.Min = min return layout.W.Layout(gtx, func(gtx layout.Context) layout.Dimensions { return layout.UniformInset(unit.Dp(2)).Layout(gtx, func(gtx layout.Context) layout.Dimensions {