Skip to content

Commit

Permalink
remove commented lines of code
Browse files Browse the repository at this point in the history
change card int type raduis params to float type
  • Loading branch information
Sirmorrison committed Dec 29, 2020
1 parent f227ba6 commit ab40dd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
16 changes: 8 additions & 8 deletions ui/decredmaterial/card.go
Expand Up @@ -16,10 +16,10 @@ type Card struct {
}

type CornerRadius struct {
NE int
NW int
SE int
SW int
NE float32
NW float32
SE float32
SW float32
}

const (
Expand All @@ -44,10 +44,10 @@ func (c Card) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
return c.Inset.Layout(gtx, func(gtx C) D {
return layout.Stack{}.Layout(gtx,
layout.Expanded(func(gtx C) D {
tr := float32(gtx.Px(unit.Dp(float32(c.Radius.NE))))
tl := float32(gtx.Px(unit.Dp(float32(c.Radius.NW))))
br := float32(gtx.Px(unit.Dp(float32(c.Radius.SE))))
bl := float32(gtx.Px(unit.Dp(float32(c.Radius.SW))))
tr := float32(gtx.Px(unit.Dp(c.Radius.NE)))
tl := float32(gtx.Px(unit.Dp(c.Radius.NW)))
br := float32(gtx.Px(unit.Dp(c.Radius.SE)))
bl := float32(gtx.Px(unit.Dp(c.Radius.SW)))
clip.RRect{
Rect: f32.Rectangle{Max: f32.Point{
X: float32(gtx.Constraints.Min.X),
Expand Down
5 changes: 0 additions & 5 deletions ui/recieve_page.go
Expand Up @@ -24,7 +24,6 @@ type receivePage struct {
newAddrBtn, minInfo decredmaterial.Button
copyBtn, infoBtn, moreBtn decredmaterial.IconButton
card decredmaterial.Card
// copyBtnW, infoBtnW, moreBtnW, minInfoW, newAddrBtnW widget.Clickable

receiveAddressLabel, addressCopiedLabel, pageInfo decredmaterial.Label
}
Expand Down Expand Up @@ -129,9 +128,6 @@ func (pg *receivePage) rightNav(gtx layout.Context) layout.Dimensions {
return layout.Dimensions{}
}),
layout.Rigid(func(gtx C) D {
// layout.Inset{Top: unit.Dp(8), Bottom: unit.Dp(8)}.Layout(gtx, func(gtx C) D {
// pg.infoBtn.Layout(gtx, &pg.infoBtnW)
// })
return layout.Dimensions{}
}),
layout.Rigid(func(gtx C) D {
Expand Down Expand Up @@ -229,7 +225,6 @@ func (pg *receivePage) Handle(common pageCommon) {
addr, err := common.wallet.NextAddress(wallet.ID, account.Number)
if err != nil {
log.Debug("Error generating new address" + err.Error())
// win.err = err.Error()
} else {
common.info.Wallets[*common.selectedWallet].Accounts[*common.selectedAccount].CurrentAddress = addr
pg.isNewAddr = false
Expand Down
1 change: 0 additions & 1 deletion ui/test/testapp.go
Expand Up @@ -57,7 +57,6 @@ func CreateWindow() (*TestStruct, error) {
win := new(TestStruct)
win.window = app.NewWindow(app.Title("GoDcr - Test app"))

// decredIcons := make(map[string]image.Image)
theme := decredmaterial.NewTheme(gofont.Collection(), nil)
if theme == nil {
return nil, errors.New("Unexpected error while loading theme")
Expand Down

0 comments on commit ab40dd4

Please sign in to comment.