-
Notifications
You must be signed in to change notification settings - Fork 27
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
New layout for trade page #139
Conversation
277b572
to
5f3c5a0
Compare
1973180
to
347d1d1
Compare
34a182a
to
74df42c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the screenshot you added, it shows that your icons are larger than the design. Kindly drop them to Layout48dp or Layout36dp
.
Also, i will like to recommend that you split the codes inside here pageContentLayout()
into multiple sub functions. That way you have a function/method for all the components of the page, and you call these functions in the mother function.
Lastly, I will recommend you wrap pageContentLayout()
in the components.UniformPadding()
. These will help properly position the page contents especially when i full screen display.
ui/page/root/trade_page.go
Outdated
layout.Rigid(func(gtx C) D { | ||
return layout.Inset{Bottom: values.MarginPadding0}.Layout(gtx, pg.Theme.Label(values.TextSize20, values.String(values.StrExchangeIntro)).Layout) | ||
}), | ||
layout.Rigid(func(gtx C) D { | ||
return layout.Inset{Bottom: values.MarginPadding16}.Layout(gtx, pg.Theme.Label(values.TextSize20, values.String(values.StrExchangeIntroPt2)).Layout) | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have exchange intro 1 and 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when it is one string I am unable get the second line to be exactly like the design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.. use this to break the string into 2, then centralize.
text := values.StringF(values.StrSourceModalInfo,
)
. In your string variable, add %v
where you want the string to break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhmm, I missed these in my first review. Your changes look straightforward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange," | ||
"exchangeIntroPt2" = "it is simple, quick, and secure." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange," | |
"exchangeIntroPt2" = "it is simple, quick, and secure." | |
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange,%v it is simple, quick, and secure." |
ui/page/root/trade_page.go
Outdated
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntro))), | ||
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntroPt2))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntro))), | |
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntroPt2))), | |
layout.Rigid(pg.titleContent(values.StringF(values.StrExchangeIntro, "<br/>"))), |
Use this to break the string into 2, then centralize.
text := values.StringF(values.StrSourceModalInfo, "<br/>")
. In your string variable, add %v
where you want the string to break.
you don't need two strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work, It breaks the sentence but doesn't allow the second line to move independently
@Sirmorrison, I requested @Vanvians to not separate the word DCRDEX in a previous review. For example, see how it’s used here: https://dex.decred.org/. |
f8c5e2f
to
93fea0e
Compare
e0d669d
to
8040168
Compare
@Sirmorrison @ukane-philemon @Vanvians sorry for this setback but the layout of the trade tab has been updated as seen in the screenshot below i have a PR for the segmented control here #175 |
IS this PR deprecated @dreacot ? |
It is, a new PR should be opened, and linked here before closing this |
Closes #80
Implements new trade page layout