Skip to content

Commit

Permalink
separate html and markdown renderers
Browse files Browse the repository at this point in the history
  • Loading branch information
ugwueze-dev committed Aug 2, 2021
1 parent 0f83726 commit 6bb088e
Show file tree
Hide file tree
Showing 5 changed files with 581 additions and 1,149 deletions.
22 changes: 1 addition & 21 deletions ui/page/overview_page.go
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/planetdecred/dcrlibwallet"
"github.com/planetdecred/godcr/ui/decredmaterial"
"github.com/planetdecred/godcr/ui/renderers"
"github.com/planetdecred/godcr/ui/values"
"github.com/planetdecred/godcr/wallet"
)
Expand Down Expand Up @@ -142,27 +141,8 @@ func (pg *OverviewPage) loadTransactions() {
pg.transactions = transactions
}

func (pg *OverviewPage) Layout(gtx C) D {
sc := `1. First ordered list item with really long text. First ordered list item with really long text. First ordered list item with really long text. First ordered list item with really long text
2. Another item
3. Actual numbers don't matter, just that it's a number
4. And another item.
Welcome to the cong
`

m := renderers.RenderMarkdown(gtx, pg.theme, sc)
l, _ := m.Layout()

return uniformPadding(gtx, func(gtx C) D {
return pg.listContainer.Layout(gtx, len(l), func(gtx C, i int) D {
return layout.UniformInset(values.MarginPadding5).Layout(gtx, l[i])
})
})
}

// Layout lays out the entire content for overview pg.
func (pg *OverviewPage) LayoutMain(gtx layout.Context) layout.Dimensions {
func (pg *OverviewPage) Layout(gtx layout.Context) layout.Dimensions {
pg.queue = gtx
if pg.WL.Info.LoadedWallets == 0 {
return uniformPadding(gtx, func(gtx C) D {
Expand Down

0 comments on commit 6bb088e

Please sign in to comment.