onboard to new custom padded box layouts

This commit is contained in:
Drew Weymouth
2024-05-24 16:57:49 -07:00
parent 883c1f738d
commit 819f42dac0
15 changed files with 22 additions and 212 deletions
+2 -2
View File
@@ -4,7 +4,6 @@ import (
"image"
"github.com/dweymouth/supersonic/backend/mediaprovider"
"github.com/dweymouth/supersonic/ui/layouts"
myTheme "github.com/dweymouth/supersonic/ui/theme"
"github.com/dweymouth/supersonic/ui/util"
@@ -12,6 +11,7 @@ import (
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
)
@@ -114,7 +114,7 @@ func (n *NowPlayingCard) CreateRenderer() fyne.WidgetRenderer {
c := container.New(&layout.CustomPaddedLayout{LeftPadding: -4},
container.NewBorder(nil, nil, n.cover, nil,
container.New(&layout.CustomPaddedLayout{TopPadding: -2},
container.New(&layouts.VboxCustomPadding{ExtraPad: -13}, n.trackName, n.artistName, n.albumName))),
container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-13), n.trackName, n.artistName, n.albumName))),
)
return widget.NewSimpleRenderer(c)
}