You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
When trying to show a disabled menu items with a non-SVG icon we get the following error:
2025/02/26 11:53:13 Fyne error:
2025/02/26 11:53:13 Cause: could not load SVG, falling back to static content: XML syntax error on line 5: invalid character entity &Ӎ� (no semicolon)
2025/02/26 11:53:13 At: /home/erik/go/fyne-dev/fyne/theme/icons.go:1408
The consequence of this bug is that non-SVG icons can currently not be used for menu items, if they might be disabled. They work fine though, for non-disabled menu items.
How to reproduce
Create a Fyne menu with at least one item
Add a non-SVG type resource as icon to the item (e.g. PNG or JPEG)
Checklist
Describe the bug
When trying to show a disabled menu items with a non-SVG icon we get the following error:
The consequence of this bug is that non-SVG icons can currently not be used for menu items, if they might be disabled. They work fine though, for non-disabled menu items.
How to reproduce
Screenshots
No response
Example code
Fyne version
2.5.4
Go compiler version
1.23.4
Operating system and version
Ubuntu 22.04
Additional Information
It looks like the bug is caused because Fyne always assuming the icon is a SVG image and tries to applies Disabled-theming to it:
menuItemRenderer.updateIcon()
This could be fixed by first checking if the icon really is a SVG image and leaving it alone if it is.
The text was updated successfully, but these errors were encountered: