update rest of icons to themed

This commit is contained in:
Drew Weymouth
2023-05-01 17:42:09 -07:00
parent 94157b3a00
commit cdac9ae66f
7 changed files with 38 additions and 18 deletions
+18
View File
@@ -61,3 +61,21 @@ func (t *ThemedRectangle) Refresh() {
func (t *ThemedRectangle) CreateRenderer() fyne.WidgetRenderer {
return widget.NewSimpleRenderer(t.rect)
}
type ThemedTappableIcon struct {
TappableIcon
IconName fyne.ThemeIconName
}
func NewThemedTappableIcon(iconName fyne.ThemeIconName) *ThemedTappableIcon {
t := &ThemedTappableIcon{IconName: iconName}
t.ExtendBaseWidget(t)
return t
}
func (t *ThemedTappableIcon) Refresh() {
icon := fyne.CurrentApp().Settings().Theme().Icon(t.IconName)
t.TappableIcon.Icon.Resource = icon
t.TappableIcon.Refresh()
}