Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons in menu items have a black background #267

Open
AlphSpirit opened this issue Feb 28, 2024 · 1 comment
Open

Icons in menu items have a black background #267

AlphSpirit opened this issue Feb 28, 2024 · 1 comment

Comments

@AlphSpirit
Copy link

AlphSpirit commented Feb 28, 2024

Referenced in #207

Here is a screenshot of the problem:

image

And here is the associated code:

func onReady() {

	iconData, err := os.ReadFile("icon/icon.ico")
	println(iconData)
	if err != nil {
		panic(err)
	}
	systray.SetTemplateIcon(iconData, iconData)
	systray.SetIcon(iconData)
	systray.SetTitle("Maitre'D MEV Service")
	systray.SetTooltip("Maitre'D MEV Service")

	titleMenuItem := systray.AddMenuItem("Maitre'D MEV Service", "Maitre'D MEV Service")
	// titleMenuItem.Disable()
	titleMenuItem.SetIcon(iconData)
	systray.AddSeparator()
	systray.AddMenuItem("Stop", "Stop the service")

}

The tray icon itself doesn't have that problem, only menu items.

I am on Windows 11 Version 23H2 Build 22631.3155

EDIT: The icon looks fine when the menu item is disabled:

image

@soease
Copy link

soease commented Oct 11, 2024

The same question 。。。。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants