Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
material: allow checkboxes without labels
Browse files Browse the repository at this point in the history
  • Loading branch information
theclapp committed Jun 23, 2020
1 parent ce6c7bc commit 60365b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions widget/material/checkable.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 60365b0

Please sign in to comment.