remove redundant CenterPad layout
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"slices"
|
||||
|
||||
"github.com/dweymouth/supersonic/res"
|
||||
"github.com/dweymouth/supersonic/ui/layouts"
|
||||
"github.com/dweymouth/supersonic/ui/util"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
@@ -201,7 +200,7 @@ func (g *GridViewItem) createContainer() {
|
||||
g.focusRect.StrokeWidth = 3
|
||||
coverStack := container.NewStack(g.Cover, g.focusRect)
|
||||
c := container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-5), coverStack, info)
|
||||
pad := &layouts.CenterPadLayout{PadLeftRight: 20, PadTopBottom: 10}
|
||||
pad := layout.NewCustomPaddedLayout(10, 10, 20, 20)
|
||||
g.container = container.New(pad, c)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"fyne.io/fyne/v2"
|
||||
"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"
|
||||
"github.com/dweymouth/supersonic/ui/layouts"
|
||||
)
|
||||
|
||||
type LoadingDots struct {
|
||||
@@ -92,9 +92,7 @@ func (l *LoadingDots) doTick(foreground, disabled color.Color) {
|
||||
|
||||
func (l *LoadingDots) CreateRenderer() fyne.WidgetRenderer {
|
||||
if l.container == nil {
|
||||
layout := &layouts.CenterPadLayout{
|
||||
PadLeftRight: 3,
|
||||
}
|
||||
layout := layout.NewCustomPaddedLayout(0, 0, 3, 3)
|
||||
l.container = container.NewHBox(
|
||||
container.New(layout, &l.dots[0]),
|
||||
container.New(layout, &l.dots[1]),
|
||||
|
||||
Reference in New Issue
Block a user