Skip to content

Example of how to use with Iced #252

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

Open
andrewdavidmackenzie opened this issue May 5, 2025 · 3 comments
Open

Example of how to use with Iced #252

andrewdavidmackenzie opened this issue May 5, 2025 · 3 comments

Comments

@andrewdavidmackenzie
Copy link

andrewdavidmackenzie commented May 5, 2025

I'm looking for a tray-icon crate to use with Iced, to pop-up a larger UI when the icon is pressed, or a menu item is selected.

Thanks for the egui.rs example. When I look at it (and run) I don't see any linkage between displaying the icon and the app, such as popping up the app on icon clicking, or de-iconizing the app on icon click etc. I guess it's mostly about receiving tray events in update() and then leaving to the author to decide what to do in the app regarding that?

Would it be possible to produce some example of how to use with Iced?

If you're in favor, with some pointers, I could try and create it...

@FabianLars
Copy link
Member

I don't think we would mind an example in the repo, iced is pretty popular after all. I don't think we have team members with extensive iced knowledge so we would very much appreciate help :)

@nate-trojian
Copy link

I had some issues trying to use tray_icon with iced on Mac, specifically because iced runs your code on a separate thread rather than the main thread. I was able to get a very basic implementation working but I had to edit iced directly. There is quite a bit more work to be done to get it to work properly, but it is possible at the very least.

@andrewdavidmackenzie
Copy link
Author

Thanks @nate-trojian I raised the issue recently in Iced discord.
Someone chipped in saying it was planned for the next release (0.14.0), but when I looked at the milestone for that release I couldn't see it.
So, unclear if planned or not.
WDYT about contributing to chat or Iced issue on the subject, with your experience and example - to see if it's something that could be got across the line in Iced?
Would be a nice win!

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

3 participants