kanban

Kanban client in Gio
Log | Files | Refs | README | LICENSE

commit ff084eaf5cfca82238f4d749abb3e52c13989e85
parent 5fb89819c40f2827cd7a3feca699035753b12f88
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date:   Thu,  5 Nov 2020 15:47:24 +0800

feat(ux): de-emphasise secondary button

Diffstat:
Mcmd/kanban/main.go | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/cmd/kanban/main.go b/cmd/kanban/main.go @@ -318,7 +318,10 @@ func (form *TicketForm) Layout(gtx C, th *material.Theme, stage string) D { return D{Size: gtx.Constraints.Min} }), layout.Rigid(func(gtx C) D { - return material.Button(th, &form.Cancel, "Cancel").Layout(gtx) + btn := material.Button(th, &form.Cancel, "Cancel") + btn.Color = th.Color.Primary + btn.Background = color.RGBA{} + return btn.Layout(gtx) }), layout.Rigid(func(gtx C) D { return D{Size: image.Point{X: gtx.Px(unit.Dp(10))}} @@ -366,15 +369,18 @@ func (d *DeleteDialog) Layout(gtx C, th *material.Theme) D { return D{Size: gtx.Constraints.Min} }), layout.Rigid(func(gtx C) D { - return material.Button(th, &d.Cancel, "Cancel").Layout(gtx) + btn := material.Button(th, &d.Cancel, "Cancel") + btn.Color = th.Color.Primary + btn.Background = color.RGBA{} + return btn.Layout(gtx) }), layout.Rigid(func(gtx C) D { return D{Size: image.Point{X: gtx.Px(unit.Dp(10))}} }), layout.Rigid(func(gtx C) D { - th := *th - th.Color.Primary = color.RGBA{R: 200, A: 255} - return material.Button(&th, &d.Ok, "Delete").Layout(gtx) + btn := material.Button(th, &d.Ok, "Delete") + btn.Background = color.RGBA{R: 200, A: 255} + return btn.Layout(gtx) }), ) })