use rounded image corners (TODO: allow disabling this)
This commit is contained in:
@@ -23,7 +23,8 @@ import (
|
||||
type NowPlayingCard struct {
|
||||
widget.BaseWidget
|
||||
|
||||
DisableRating bool
|
||||
DisableRating bool
|
||||
ImageCornerRadius float32
|
||||
|
||||
trackName *OptionHyperlink
|
||||
artistName *MultiHyperlink
|
||||
@@ -163,6 +164,11 @@ func (n *NowPlayingCard) Update(track mediaprovider.MediaItem) {
|
||||
n.Refresh()
|
||||
}
|
||||
|
||||
func (n *NowPlayingCard) Refresh() {
|
||||
n.cover.CornerRadius = n.ImageCornerRadius
|
||||
n.BaseWidget.Refresh()
|
||||
}
|
||||
|
||||
func (n *NowPlayingCard) SetImage(cover image.Image) {
|
||||
n.cover.SetImage(cover, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user