switch to simpler way of themeing PNG icons

This commit is contained in:
Drew Weymouth
2023-05-01 17:49:59 -07:00
parent 0d8c7d3830
commit 6c81db4398
11 changed files with 91 additions and 92 deletions
+2 -4
View File
@@ -32,12 +32,10 @@ func (f *FavoriteButton) Tapped(e *fyne.PointEvent) {
}
func (f *FavoriteButton) Refresh() {
var iconName fyne.ThemeIconName
if f.IsFavorited {
iconName = theme.IconNameFavorite
f.Icon = theme.FavoriteIcon
} else {
iconName = theme.IconNameNotFavorite
f.Icon = theme.NotFavoriteIcon
}
f.Icon = fyne.CurrentApp().Settings().Theme().Icon(iconName)
f.Button.Refresh()
}