Add rounded rectangle background to Album, Artist, Playlist page headers
This commit is contained in:
@@ -238,18 +238,19 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
|
||||
a.toggleFavButton = widgets.NewFavoriteButton(func() { go a.toggleFavorited() })
|
||||
|
||||
// Todo: there's got to be a way to make this less convoluted. Custom layout?
|
||||
a.container = container.NewBorder(nil, nil, a.cover, nil,
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.titleLabel,
|
||||
container.NewVBox(
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -12}, a.artistLabel, a.genreLabel, a.miscLabel),
|
||||
a.container = util.AddHeaderBackground(
|
||||
container.NewBorder(nil, nil, a.cover, nil,
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.titleLabel,
|
||||
container.NewVBox(
|
||||
container.NewHBox(util.NewHSpace(2), playButton, shuffleBtn, menuBtn),
|
||||
container.NewHBox(util.NewHSpace(2), a.toggleFavButton),
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -12}, a.artistLabel, a.genreLabel, a.miscLabel),
|
||||
container.NewVBox(
|
||||
container.NewHBox(util.NewHSpace(2), playButton, shuffleBtn, menuBtn),
|
||||
container.NewHBox(util.NewHSpace(2), a.toggleFavButton),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
))
|
||||
return a
|
||||
}
|
||||
|
||||
|
||||
@@ -395,11 +395,13 @@ func (a *ArtistPageHeader) toggleFavorited() {
|
||||
}
|
||||
|
||||
func (a *ArtistPageHeader) createContainer() {
|
||||
a.container = container.NewBorder(nil, nil, a.artistImage, nil,
|
||||
container.NewVBox(
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.titleDisp, a.biographyDisp, a.similarArtists),
|
||||
container.NewHBox(util.NewHSpace(2), a.favoriteBtn, a.playBtn, a.playRadioBtn)))
|
||||
a.container = util.AddHeaderBackground(
|
||||
container.NewBorder(nil, nil, a.artistImage, nil,
|
||||
container.NewVBox(
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.titleDisp, a.biographyDisp, a.similarArtists),
|
||||
container.NewHBox(util.NewHSpace(2), a.favoriteBtn, a.playBtn, a.playRadioBtn)),
|
||||
))
|
||||
}
|
||||
|
||||
func (a *ArtistPageHeader) CreateRenderer() fyne.WidgetRenderer {
|
||||
|
||||
@@ -291,13 +291,14 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader {
|
||||
pop.ShowAtPosition(fyne.NewPos(pos.X, pos.Y+menuBtn.Size().Height))
|
||||
}
|
||||
|
||||
a.container = container.NewBorder(nil, nil, a.image, nil,
|
||||
container.NewVBox(a.titleLabel, container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.descriptionLabel,
|
||||
a.ownerLabel,
|
||||
a.trackTimeLabel),
|
||||
container.NewHBox(a.editButton, playButton, shuffleBtn, menuBtn),
|
||||
))
|
||||
a.container = util.AddHeaderBackground(
|
||||
container.NewBorder(nil, nil, a.image, nil,
|
||||
container.NewVBox(a.titleLabel, container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
a.descriptionLabel,
|
||||
a.ownerLabel,
|
||||
a.trackTimeLabel),
|
||||
container.NewHBox(a.editButton, playButton, shuffleBtn, menuBtn),
|
||||
)))
|
||||
return a
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user