diff --git a/ui/cryptomaterial/segmented_control.go b/ui/cryptomaterial/segmented_control.go index f47c2c4eb..1de9d01ac 100644 --- a/ui/cryptomaterial/segmented_control.go +++ b/ui/cryptomaterial/segmented_control.go @@ -36,7 +36,7 @@ type SegmentedControl struct { slideActionTitle *SlideAction segmentType SegmentType - IsAllowsCycle bool + allowCycle bool } func (t *Theme) SegmentedControl(segmentTitles []string, segmentType SegmentType) *SegmentedControl { @@ -248,7 +248,7 @@ func (sc *SegmentedControl) handleActionEvent(isNext bool) { l := len(sc.segmentTitles) - 1 // index starts at 0 if isNext { if sc.selectedIndex == l { - if !sc.IsAllowsCycle { + if !sc.allowCycle { return } sc.selectedIndex = 0 @@ -259,7 +259,7 @@ func (sc *SegmentedControl) handleActionEvent(isNext bool) { sc.slideActionTitle.PushLeft() } else { if sc.selectedIndex == 0 { - if !sc.IsAllowsCycle { + if !sc.allowCycle { return } sc.selectedIndex = l diff --git a/ui/page/root/overview_page.go b/ui/page/root/overview_page.go index 8c04fd94f..11f0a8947 100644 --- a/ui/page/root/overview_page.go +++ b/ui/page/root/overview_page.go @@ -406,7 +406,7 @@ func (pg *OverviewPage) assetBalanceItemLayout(item *assetBalanceSliderItem, row return item.backgroundImage.LayoutSize2(gtx, gtx.Metric.PxToDp(width), gtx.Metric.PxToDp(height)) }), layout.Expanded(func(gtx C) D { - return pg.contentSliderLayout(item)(gtx) + return layout.Center.Layout(gtx, pg.contentSliderLayout(item)) }), ) })