[WIP] fix #63: Add SystemTray::set_icon to change the icon at runtime #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR to solve #64
Submitting this early since I have the feeling that I'm making the code
a lot uglier. I'm new to Rust in terms of actual contributions so I'd
like a first pass review to see if I'm approaching this the right way.
I decided to add an
instancefield toSystemTrayso that it can holdthe platform-specific system tray instance, in the case of Linux that's
an
AppIndicator. This is so that later on we can access that instanceduring runtime and use its
set_iconmethod.Later on this can be extended to
set_itemsto also solve #63What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
&mut selfinSystemTray::initialize)The PR fulfills these requirements:
fix: #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: