use rounded image corners (TODO: allow disabling this)

This commit is contained in:
Drew Weymouth
2025-11-15 10:35:17 -08:00
parent 9f399a447c
commit c14342eff8
14 changed files with 30 additions and 12 deletions
+7 -1
View File
@@ -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)
}