~eliasnaur/gio-example

aeef185ca39ccea4e673287d87db039ccee3edbb — Elias Naur 2 months ago b1cac82
kitchen: fix nil check

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M kitchen/kitchen.go
M kitchen/kitchen.go => kitchen/kitchen.go +1 -1
@@ 212,7 212,7 @@ func (b iconAndTextButton) Layout(gtx layout.Context) layout.Dimensions {
			layIcon := layout.Rigid(func(gtx C) D {
				return layout.Inset{Right: textIconSpacer}.Layout(gtx, func(gtx C) D {
					var d D
					if icon != nil {
					if b.icon != nil {
						size := gtx.Px(unit.Dp(56)) - 2*gtx.Px(unit.Dp(16))
						gtx.Constraints = layout.Exact(image.Pt(size, size))
						d = b.icon.Layout(gtx)