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

Do not reset icon_is_template when chaning the icon with set_icon #203

Closed
mrexox opened this issue Nov 6, 2024 · 0 comments · Fixed by #204
Closed

Do not reset icon_is_template when chaning the icon with set_icon #203

mrexox opened this issue Nov 6, 2024 · 0 comments · Fixed by #204

Comments

@mrexox
Copy link
Contributor

mrexox commented Nov 6, 2024

I want to animate a system tray icon of a macOS app. For that I change the icon with a small delay:

tray.set_icon(Some(icons[i].clone()))?;
tray.set_icon_as_template(cfg!(target_os = "macos"))?;
sleep(Duration::from_millis(100)).await;

When my background is dark, the icons draw with white. But animation is glitchy because set_icon sets the icon colored with black, and only set_icon_as_tempalte call repaints it.

I wish these settings applied simultaneously or at least icon_is_template didn't change when I update the icon with set_icon. Is it possible to add this change to API?

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

Successfully merging a pull request may close this issue.

1 participant