From ba2b630e07f1e482ea80e6fb306634f765911b2b Mon Sep 17 00:00:00 2001 From: tuhalang Date: Sat, 8 May 2021 09:21:32 +0700 Subject: [PATCH] fix go lint --- ui/compontents.go | 2 +- ui/decredmaterial/label.go | 3 ++- ui/decredmaterial/theme.go | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/compontents.go b/ui/compontents.go index f8d5d9ea0..070da0d05 100644 --- a/ui/compontents.go +++ b/ui/compontents.go @@ -330,7 +330,7 @@ func transactionRow(gtx layout.Context, common pageCommon, row TransactionRow) l status := common.theme.Body1(s) if row.transaction.Status != "confirmed" { status.Color = common.theme.Color.Gray5 - }else{ + } else { status.Color = common.theme.Color.Gray4 } status.Alignment = text.Middle diff --git a/ui/decredmaterial/label.go b/ui/decredmaterial/label.go index 823927cf2..d4a600989 100644 --- a/ui/decredmaterial/label.go +++ b/ui/decredmaterial/label.go @@ -3,9 +3,10 @@ package decredmaterial import ( + "image/color" + "gioui.org/unit" "gioui.org/widget/material" - "image/color" ) type Label struct { diff --git a/ui/decredmaterial/theme.go b/ui/decredmaterial/theme.go index 0c0509ecc..7d6efdeac 100644 --- a/ui/decredmaterial/theme.go +++ b/ui/decredmaterial/theme.go @@ -90,7 +90,7 @@ type Theme struct { DarkMode bool } -func (t *Theme) setColorMode(darkMode bool){ +func (t *Theme) setColorMode(darkMode bool) { if darkMode { t.DarkMode = true t.Color.Primary = rgb(0x57B6FF) @@ -144,8 +144,8 @@ func (t *Theme) setColorMode(darkMode bool){ func NewTheme(fontCollection []text.FontFace, decredIcons map[string]image.Image, isDarkModeOn bool) *Theme { t := &Theme{ - Shaper: text.NewCache(fontCollection), - Base: material.NewTheme(fontCollection), + Shaper: text.NewCache(fontCollection), + Base: material.NewTheme(fontCollection), DarkMode: false, }