From 39f782e8093a1432bae7735faebc6935890c5e29 Mon Sep 17 00:00:00 2001 From: dreacot Date: Wed, 25 Sep 2024 12:04:06 +0100 Subject: [PATCH] fix hide button alignment fix market overview background --- ui/page/root/home_page.go | 4 ++-- ui/page/root/overview_page.go | 2 +- ui/page/send/layout.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/page/root/home_page.go b/ui/page/root/home_page.go index 5baff2479..3957647ac 100644 --- a/ui/page/root/home_page.go +++ b/ui/page/root/home_page.go @@ -891,14 +891,14 @@ func (hp *HomePage) totalBalanceLayout(gtx C) D { func (hp *HomePage) balanceLayout(gtx C) D { if hp.AssetsManager.ExchangeRateFetchingEnabled() && totalBalanceUSD != "" { - return layout.Flex{}.Layout(gtx, + return layout.Flex{Alignment: layout.Middle}.Layout(gtx, layout.Rigid(hp.LayoutUSDBalance), layout.Rigid(func(gtx C) D { icon := hp.Theme.Icons.VisibilityOffIcon if hp.isBalanceHidden { icon = hp.Theme.Icons.VisibilityIcon } - return layout.Inset{Top: values.MarginPadding5}.Layout(gtx, func(gtx C) D { + return layout.Inset{}.Layout(gtx, func(gtx C) D { return hp.hideBalanceButton.Layout(gtx, hp.Theme.NewIcon(icon).Layout24dp) }) }), diff --git a/ui/page/root/overview_page.go b/ui/page/root/overview_page.go index d0e8890b3..651094d59 100644 --- a/ui/page/root/overview_page.go +++ b/ui/page/root/overview_page.go @@ -697,7 +697,7 @@ func (pg *OverviewPage) mobileMarketOverview(gtx C) D { card := pg.Theme.Card() radius := cryptomaterial.CornerRadius{TopLeft: 20, BottomLeft: 20, TopRight: 20, BottomRight: 20} card.Radius = cryptomaterial.Radius(8) - card.Color = pg.Theme.Color.DefaultThemeColors().SurfaceHighlight + card.Color = pg.Theme.Color.DefaultThemeColors().Surface if pg.AssetsManager.IsDarkModeOn() { card.Color = pg.Theme.Color.DefaultThemeColors().Background } diff --git a/ui/page/send/layout.go b/ui/page/send/layout.go index 0c0b0236d..aecfaca6c 100644 --- a/ui/page/send/layout.go +++ b/ui/page/send/layout.go @@ -148,7 +148,7 @@ func (pg *Page) sendLayout(gtx C) D { } func (pg *Page) titleLayout(gtx C) D { - return layout.Flex{}.Layout(gtx, + return layout.Flex{Alignment: layout.Middle}.Layout(gtx, layout.Rigid(func(gtx C) D { return layout.Inset{Right: values.MarginPadding6}.Layout(gtx, func(gtx C) D { lbl := pg.Theme.Label(values.TextSizeTransform(pg.IsMobileView(), values.TextSize20), values.String(values.StrSend))