Fix #735: adjust spacing on Now Playing page card
This commit is contained in:
@@ -212,7 +212,7 @@ type AlbumPageHeader struct {
|
|||||||
titleLabel *widget.RichText
|
titleLabel *widget.RichText
|
||||||
releaseTypeLabel *widget.RichText
|
releaseTypeLabel *widget.RichText
|
||||||
artistLabel *widgets.MultiHyperlink
|
artistLabel *widgets.MultiHyperlink
|
||||||
artistLabelSpace *util.HSpace // TODO: remove when no longer needed
|
artistLabelSpace *util.Space // TODO: remove when no longer needed
|
||||||
genreLabel *widgets.MultiHyperlink
|
genreLabel *widgets.MultiHyperlink
|
||||||
miscLabel *widget.Label
|
miscLabel *widget.Label
|
||||||
shareMenuItem *fyne.MenuItem
|
shareMenuItem *fyne.MenuItem
|
||||||
|
|||||||
+15
-8
@@ -401,22 +401,29 @@ type ToolTipRichText struct {
|
|||||||
OnTapped func(e *fyne.PointEvent)
|
OnTapped func(e *fyne.PointEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
type HSpace struct {
|
type Space struct {
|
||||||
widget.BaseWidget
|
widget.BaseWidget
|
||||||
|
|
||||||
Width float32
|
Width float32
|
||||||
|
Height float32
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewHSpace(w float32) *HSpace {
|
func NewHSpace(w float32) *Space {
|
||||||
h := &HSpace{Width: w}
|
s := &Space{Width: w}
|
||||||
h.ExtendBaseWidget(h)
|
s.ExtendBaseWidget(s)
|
||||||
return h
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *HSpace) MinSize() fyne.Size {
|
func NewVSpace(h float32) *Space {
|
||||||
return fyne.NewSize(h.Width, 0)
|
s := &Space{Height: h}
|
||||||
|
s.ExtendBaseWidget(s)
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *HSpace) CreateRenderer() fyne.WidgetRenderer {
|
func (h *Space) MinSize() fyne.Size {
|
||||||
|
return fyne.NewSize(h.Width, h.Height)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *Space) CreateRenderer() fyne.WidgetRenderer {
|
||||||
return widget.NewSimpleRenderer(layout.NewSpacer())
|
return widget.NewSimpleRenderer(layout.NewSpacer())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||||
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
||||||
|
"github.com/dweymouth/supersonic/ui/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Shows the current album art, track name, artist name, and album name
|
// Shows the current album art, track name, artist name, and album name
|
||||||
@@ -59,10 +60,11 @@ func NewLargeNowPlayingCard() *LargeNowPlayingCard {
|
|||||||
n.rating,
|
n.rating,
|
||||||
layout.NewSpacer(),
|
layout.NewSpacer(),
|
||||||
)
|
)
|
||||||
n.Caption = container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-13),
|
n.Caption = container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-15),
|
||||||
n.trackName,
|
n.trackName,
|
||||||
n.artistName,
|
n.artistName,
|
||||||
n.albumName,
|
n.albumName,
|
||||||
|
util.NewVSpace(20),
|
||||||
n.ratingFavoriteContainer,
|
n.ratingFavoriteContainer,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user