Skip to content

Commit

Permalink
workaround github.com/fyne-io/fyne/issues/4345 - hide empty nowplayin…
Browse files Browse the repository at this point in the history
…g image
  • Loading branch information
dweymouth committed Nov 1, 2023
1 parent c9320b8 commit ffc6a8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/widgets/nowplayingcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func NewNowPlayingCard() *NowPlayingCard {
n.trackName.TextStyle.Bold = true
n.cover.SetMinSize(fyne.NewSize(85, 85))
n.cover.FillMode = canvas.ImageFillContain
n.cover.Hidden = true

n.c = container.New(&layouts.MaxPadLayout{PadLeft: -5},
container.NewBorder(nil, nil, n.cover, nil,
Expand Down Expand Up @@ -91,6 +92,7 @@ func (n *NowPlayingCard) Update(track string, artists, artistIDs []string, album
n.albumName.SetText(album)
n.albumName.Hidden = album == ""
n.cover.Image.Image = cover
n.cover.Hidden = cover == nil
n.c.Refresh()
}

Expand Down

0 comments on commit ffc6a8f

Please sign in to comment.