refactor(tracker/gioui): make iconCache part of Theme

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-20 19:05:40 +03:00
parent b291959a97
commit 4fa0e04788
6 changed files with 22 additions and 31 deletions

View File

@ -96,7 +96,7 @@ func (m *MenuStyle) Layout(gtx C, items ...MenuItem) D {
if i == m.Menu.hover-1 && item.Doer.Enabled() {
macro = op.Record(gtx.Ops)
}
icon := widgetForIcon(item.IconBytes)
icon := m.Theme.Icon(item.IconBytes)
iconColor := m.LabelStyle.Color
iconInset := layout.Inset{Left: unit.Dp(12), Right: unit.Dp(6)}
textLabel := Label(m.Theme, &m.Theme.Menu.Text, item.Text)