Skip to content

Commit

Permalink
update wallet name for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeBoy committed Mar 12, 2024
1 parent 43ebb13 commit fca2ef9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
9 changes: 8 additions & 1 deletion ui/page/root/wallet_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,14 @@ func (pg *WalletSelectorPage) layoutNameAndBalance(gtx C, item *walletWithBalanc
return layout.Inset{
Left: values.MarginPadding8,
}.Layout(gtx, func(gtx C) D {
return components.WalletHighlightLabel(pg.Theme, gtx, values.TextSize12, values.String(values.StrWatchOnly))
if !pg.IsMobileView() {
return components.WalletHighlightLabel(pg.Theme, gtx, values.TextSize12, values.String(values.StrWatchOnly))
}
image := components.CoinImageBySymbol(pg.Load, item.wallet.GetAssetType(), true)
if image == nil {
return D{}
}
return image.LayoutTransform(gtx, true, values.MarginPadding24)
})
}
return D{}
Expand Down
20 changes: 8 additions & 12 deletions ui/page/root/wallet_selector_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (pg *WalletSelectorPage) pageContentLayout(gtx C) D {
Margin: layout.Inset{
Bottom: values.MarginPadding30,
},
Padding: layout.Inset{Left: values.MarginPadding16, Right: values.MarginPadding16},
Padding: components.HorizontalInset(values.MarginPaddingTransform(pg.IsMobileView(), values.MarginPadding16)),
}.Layout2(gtx, func(gtx C) D {
return pg.Theme.List(pg.scrollContainer).Layout(gtx, len(pageContent), func(gtx C, i int) D {
return pageContent[i](gtx)
Expand All @@ -288,17 +288,13 @@ func (pg *WalletSelectorPage) pageContentLayout(gtx C) D {

func (pg *WalletSelectorPage) assetDropdown(asset libutils.AssetType) layout.Widget {
return func(gtx C) D {
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
layout.Rigid(func(gtx C) D {
return pg.assetCollapsibles[asset].Layout(gtx,
func(gtx C) D {
return pg.dropdownTitleLayout(gtx, asset)
},
func(gtx C) D {
return pg.dropdownContentLayout(gtx, asset)
},
)
}),
return pg.assetCollapsibles[asset].Layout(gtx,
func(gtx C) D {
return pg.dropdownTitleLayout(gtx, asset)
},
func(gtx C) D {
return pg.dropdownContentLayout(gtx, asset)
},
)
}
}
Expand Down

0 comments on commit fca2ef9

Please sign in to comment.