Skip to content

Commit

Permalink
remove send page title
Browse files Browse the repository at this point in the history
reduce top and bottom paadding for single wallet menu
reduce padding betwen send page content
  • Loading branch information
dreacot committed Sep 23, 2024
1 parent ce4c7d0 commit 974e308
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions ui/page/send/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (pg *Page) contentLayout(gtx C) D {
return layout.Stack{Alignment: layout.S}.Layout(gtx,
layout.Expanded(func(gtx C) D {
return pg.Theme.List(pg.pageContainer).Layout(gtx, len(pageContent), func(gtx C, i int) D {
mp := values.MarginPaddingTransform(pg.IsMobileView(), values.MarginPadding32)
mp := values.MarginPaddingTransform(pg.IsMobileView(), values.MarginPadding8)
if i == len(pageContent)-1 {
mp = values.MarginPadding0
}
Expand All @@ -107,20 +107,23 @@ func (pg *Page) sendLayout(gtx C) D {
return pg.sectionWrapper(gtx, func(gtx C) D {
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
layout.Rigid(func(gtx C) D {
if pg.hideWalletDropdown { // Hide title while on the send page
return D{}
}
return layout.Inset{
Bottom: values.MarginPadding16,
Bottom: values.MarginPadding8,
}.Layout(gtx, pg.titleLayout)
}),
layout.Rigid(func(gtx C) D {
if pg.hideWalletDropdown {
return D{}
}
return layout.Inset{Bottom: values.MarginPadding16}.Layout(gtx, func(gtx C) D {
return layout.Inset{Bottom: values.MarginPadding8}.Layout(gtx, func(gtx C) D {
return pg.walletDropdown.Layout(gtx, values.String(values.StrSourceWallet))
})
}),
layout.Rigid(func(gtx C) D {
return layout.Inset{Top: values.MarginPadding16}.Layout(gtx, func(gtx C) D {
return layout.Inset{Top: values.MarginPadding0}.Layout(gtx, func(gtx C) D {
return pg.accountDropdown.Layout(gtx, values.String(values.StrSourceAccount))
})
}),
Expand Down
6 changes: 3 additions & 3 deletions ui/page/wallet/single_wallet_main_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (swmp *SingleWalletMasterPage) initTabOptions() {
swmp.PageNavigationTab.ContentPadding = layout.Inset{
Left: dp5,
Right: dp5,
Top: values.MarginPaddingTransform(swmp.IsMobileView(), values.MarginPadding32),
Top: values.MarginPaddingTransform(swmp.IsMobileView(), values.MarginPadding16),
}
}

Expand Down Expand Up @@ -490,8 +490,8 @@ func (swmp *SingleWalletMasterPage) Layout(gtx C) D {
layout.Rigid(swmp.LayoutTopBar),
layout.Rigid(func(gtx C) D {
return layout.Inset{
Top: values.MarginPadding24,
Bottom: values.MarginPadding16,
Top: values.MarginPadding0,
Bottom: values.MarginPadding0,
}.Layout(gtx, func(gtx C) D {
return swmp.PageNavigationTab.Layout(gtx, func(gtx C) D {
if swmp.CurrentPage() == nil {
Expand Down

0 comments on commit 974e308

Please sign in to comment.