more light theme work: themed icon button, colors adj

This commit is contained in:
Drew Weymouth
2023-05-01 17:40:39 -07:00
parent 4711a2b196
commit 94157b3a00
6 changed files with 148 additions and 43 deletions
+5 -2
View File
@@ -2,6 +2,7 @@ package widgets
import (
"supersonic/res"
"supersonic/ui/theme"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
@@ -31,10 +32,12 @@ func (f *FavoriteButton) Tapped(e *fyne.PointEvent) {
}
func (f *FavoriteButton) Refresh() {
var iconName fyne.ThemeIconName
if f.IsFavorited {
f.Icon = res.ResHeartFilledInvertPng
iconName = theme.IconNameFavorite
} else {
f.Icon = res.ResHeartOutlineInvertPng
iconName = theme.IconNameNotFavorite
}
f.Icon = fyne.CurrentApp().Settings().Theme().Icon(iconName)
f.Button.Refresh()
}