Skip to content

Commit

Permalink
Add support for template icon for system tray menu icons
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Mar 4, 2024
1 parent 4f9d61b commit f6607d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/driver/glfw/driver_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ func itemForMenuItem(i *fyne.MenuItem, parent *systray.MenuItem) *systray.MenuIt
if err != nil {
fyne.LogError("Failed to convert systray icon", err)
} else {
item.SetIcon(img)
if _, ok := i.Icon.(*theme.ThemedResource); ok {
item.SetTemplateIcon(img, img)
} else {
item.SetIcon(img)
}
}
}
return item
Expand Down

0 comments on commit f6607d6

Please sign in to comment.