Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi : Godcr newui #262

Merged
merged 20 commits into from
Nov 25, 2020
Merged

Conversation

Sirmorrison
Copy link
Contributor

@Sirmorrison Sirmorrison commented Nov 11, 2020

Fix #259
Fix #264
Close #260
This PR Implements the new Godcr UI Navigation, overview page and transactions page.

Transaction pages

image

image

Overview Page

image

image

Transaction details page

image

image

image

ui/decredmaterial/collapsible.go Outdated Show resolved Hide resolved
ui/decredmaterial/collapsible.go Outdated Show resolved Hide resolved
ui/decredmaterial/collapsible.go Outdated Show resolved Hide resolved
ui/decredmaterial/combo.go Outdated Show resolved Hide resolved
ui/decredmaterial/combo.go Outdated Show resolved Hide resolved
ui/decredmaterial/combo.go Outdated Show resolved Hide resolved
ui/decredmaterial/combo.go Outdated Show resolved Hide resolved
ui/overview_page.go Show resolved Hide resolved
Comment on lines +267 to +333
func (page pageCommon) layoutAppBar(gtx layout.Context) layout.Dimensions {
return decredmaterial.Card{Color: page.theme.Color.Surface}.Layout(gtx, func(gtx C) D {
gtx.Constraints.Min.X = gtx.Constraints.Max.X
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
layout.Rigid(func(gtx C) D {
m := values.MarginPadding5
return layout.Inset{
Top: m,
Bottom: m,
Left: m,
Right: values.MarginPadding15,
}.Layout(gtx, func(gtx C) D {
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
layout.Rigid(func(gtx C) D {
img := widget.Image{Src: paint.NewImageOp(page.icons.logo)}
img.Scale = 0.085

return img.Layout(gtx)
}),
layout.Rigid(func(gtx C) D {
return layout.Inset{Left: values.MarginPadding10}.Layout(gtx, func(gtx C) D {
return layout.Inset{Top: values.MarginPadding5}.Layout(gtx, func(gtx C) D {
return page.layoutBalance(gtx, page.info.TotalBalance)
})
})
}),
layout.Rigid(func(gtx C) D {
gtx.Constraints.Min.X = gtx.Constraints.Max.X
return layout.E.Layout(gtx, func(gtx C) D {
list := layout.List{Axis: layout.Horizontal}
return list.Layout(gtx, len(page.appBarNavItems), func(gtx C, i int) D {
return layout.UniformInset(values.MarginPadding15).Layout(gtx, func(gtx C) D {
return decredmaterial.Clickable(gtx, page.appBarNavItems[i].clickable, func(gtx C) D {
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
layout.Rigid(func(gtx C) D {
page.appBarNavItems[i].image.Scale = 0.05

return layout.Center.Layout(gtx, func(gtx C) D {
return page.appBarNavItems[i].image.Layout(gtx)
})
}),
layout.Rigid(func(gtx C) D {
return layout.Inset{
Left: values.MarginPadding10,
}.Layout(gtx, func(gtx C) D {
return layout.Center.Layout(gtx, func(gtx C) D {
return page.theme.Body1(page.appBarNavItems[i].page).Layout(gtx)
})
})
}),
)
})
})
})
})
}),
)
})
}),
layout.Rigid(func(gtx C) D {
l := page.theme.Line()
l.Color = page.theme.Color.Background
l.Width = gtx.Constraints.Min.X
l.Height = 2
return l.Layout(gtx)
}),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wasn't the tab widget modified to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. This can be revisited when the PR is merged to prevent further stalling in the project.

ui/transaction_details_page.go Outdated Show resolved Hide resolved
ui/transactions_page.go Outdated Show resolved Hide resolved
ui/wallet_page.go Outdated Show resolved Hide resolved
@Sirmorrison Sirmorrison changed the title Godcr newui multi : Godcr newui Nov 17, 2020
@Sirmorrison Sirmorrison force-pushed the godcr_newui branch 6 times, most recently from e00a626 to 9e09006 Compare November 25, 2020 06:58
song50119 and others added 20 commits November 25, 2020 08:10
set active and inactive nav item
and more sub-page btns are clicked
remove overview page hardcoded unit parameters
update dropdown widget to confirm to new ui design
change collapsible widget chevron icon
remove hardcoded unit params from txpage
fix app crash when tx detail back btn is clicked
align header contents to new ui
add step amount to tx table amount
optimize overview, tx, txdetails,page codes
remove modal line and title
use newui gray color on details text
rename combo to dropdown
fix lint
optimize code
@oshorefueled oshorefueled merged commit 7d1e83e into planetdecred:master Nov 25, 2020
song50119 pushed a commit to song50119/godcr that referenced this pull request Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copy blue texts to clipboard when clicked Implement new GUI mockups
4 participants