We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5def810 commit 2911127Copy full SHA for 2911127
docs/guides/features/system-tray.md
@@ -187,10 +187,10 @@ fn main() {
187
188
#### Updating tray icon
189
190
-Note that `tauri::Icon` must be a `Path` variant on Linux, and `Raw` variant on Windows and macOS.
+Note that you need to add `icon-ico` or `icon-png` feature flag to the tauri dependency in your Cargo.toml in order to be able to use `Icon::Raw`
191
192
```rust
193
-app.tray_handle().set_icon(tauri::Icon::Raw(include_bytes!("../path/to/myicon.ico"))).unwrap();
+app.tray_handle().set_icon(tauri::Icon::Raw(include_bytes!("../path/to/myicon.ico").to_vec())).unwrap();
194
```
195
196
[template image]: https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc
0 commit comments