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
Add backdrop for dropdown #616
Conversation
- add IsOpen() and CloseDropdown() to dropdown widget
@JustinBeBoy This hasn't been implemented in the ticket activity page |
- add backdrop to ticket activity page - fix wallet dropdown icon size and alignment with wallet text
This is now resolved. |
- Remove backdrops in all pages use dropdown - Refactor code in dropdown, transaction page, activity page and list page - Align layout dropdown in pages use it
fde8fa8
to
8d74ba1
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.
ui/page/transactions_page.go
Outdated
return pg.walletDropDown.Layout(gtx, 0) | ||
}), | ||
layout.Expanded(func(gtx C) D { | ||
post := float32(gtx.Constraints.Max.X - 315) |
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.
rename all occurrence of post
to position
or pos
@Sirmorrison I can't also reproduce the ui bug. |
Let me try from my mac machine it was noticed on windows this is what i get on my macbook transaction page ticket page |
ui/page/tickets/activity_page.go
Outdated
layout.Expanded(func(gtx C) D { | ||
return pg.walletDropDown.Layout(gtx, 0) | ||
}), | ||
layout.Expanded(func(gtx C) D { | ||
post := float32(gtx.Constraints.Max.X - 150) | ||
return pg.orderDropDown.Layout(gtx, post) | ||
}), | ||
layout.Expanded(func(gtx C) D { | ||
post := float32(gtx.Constraints.Max.X - 315) | ||
return pg.ticketTypeDropDown.Layout(gtx, post) |
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.
So doing troubleshooting, this seems to be where the issue is coming from.
Changing the values as suggested below, give me the screenshots below.
layout.Expanded(func(gtx C) D { | |
return pg.walletDropDown.Layout(gtx, 0) | |
}), | |
layout.Expanded(func(gtx C) D { | |
post := float32(gtx.Constraints.Max.X - 150) | |
return pg.orderDropDown.Layout(gtx, post) | |
}), | |
layout.Expanded(func(gtx C) D { | |
post := float32(gtx.Constraints.Max.X - 315) | |
return pg.ticketTypeDropDown.Layout(gtx, post) | |
layout.Expanded(func(gtx C) D { | |
return pg.walletDropDown.Layout(gtx, 0) | |
}), | |
layout.Expanded(func(gtx C) D { | |
post := float32(gtx.Constraints.Max.X - 450) | |
return pg.orderDropDown.Layout(gtx, post) | |
}), | |
layout.Expanded(func(gtx C) D { | |
post := float32(gtx.Constraints.Max.X - 300) | |
return pg.ticketTypeDropDown.Layout(gtx, post) |
I think the issue here has to do with the screen size of the machine. you will need to use gtx.Px()
for positioning and scaling.
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.
PR looks good.
* custom dropdown backdrop and implement page use * add backdrop to tx and ticket page - add IsOpen() and CloseDropdown() to dropdown widget * fix wallet dropdown not opening bug ticket activity page - add backdrop to ticket activity page - fix wallet dropdown icon size and alignment with wallet text * - Create backdrop for dropdown - Remove backdrops in all pages use dropdown - Refactor code in dropdown, transaction page, activity page and list page - Align layout dropdown in pages use it * fix issue of different screen resolutions * change layout and resolve different resolutions * caculate and change space between dropdown Co-authored-by: sirmorrison <edonomorrison@gmail.com>
This PR resolve #581 with detail: