Skip to content

Commit

Permalink
fix go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhalang committed May 8, 2021
1 parent 6bc1e62 commit 1cfaf15
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ui/compontents.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion ui/decredmaterial/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
package decredmaterial

import (
"image/color"

"gioui.org/unit"
"gioui.org/widget/material"
"image/color"
)

type Label struct {
Expand Down
6 changes: 3 additions & 3 deletions ui/decredmaterial/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
}

Expand Down
4 changes: 2 additions & 2 deletions ui/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (win *Window) addPages(decredIcons map[string]image.Image) {
win.loadPage(common)
}

func (win *Window) loadPage(common pageCommon){
func (win *Window) loadPage(common pageCommon) {
win.pages = make(map[string]layout.Widget)
win.pages[PageWallet] = win.WalletPage(common)
win.pages[PageOverview] = win.OverviewPage(common)
Expand Down Expand Up @@ -354,7 +354,7 @@ func (win *Window) loadPage(common pageCommon){
win.pages[ValidateAddress] = win.ValidateAddressPage(common)
}

func (win *Window) reloadPage(common pageCommon){
func (win *Window) reloadPage(common pageCommon) {
win.loadPage(common)
}

Expand Down
4 changes: 2 additions & 2 deletions ui/transactions_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type transactionsPage struct {
filterDirection, filterSort []decredmaterial.RadioButton
toTxnDetails []*gesture.Click
separator decredmaterial.Line
theme *decredmaterial.Theme
theme *decredmaterial.Theme

orderDropDown *decredmaterial.DropDown
txTypeDropDown *decredmaterial.DropDown
Expand All @@ -53,7 +53,7 @@ func (win *Window) TransactionsPage(common pageCommon) layout.Widget {
filterDirectionW: new(widget.Enum),
filterSortW: new(widget.Enum),
separator: common.theme.Separator(),
theme: common.theme,
theme: common.theme,
}

pg.orderDropDown = common.theme.DropDown([]decredmaterial.DropDownItem{{Text: "Newest"}, {Text: "Oldest"}}, 1)
Expand Down

0 comments on commit 1cfaf15

Please sign in to comment.