Using SystemTray.with_title on Ubuntu/Windows #6302
-
So I get from the docs that the title options on the SystemTray and SystemTrayHandle are only for MacOS. But how can I set it up so that it only tries to include this for MacOS and ignores it or does nothing on linux and windows?
|
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Feb 17, 2023
Replies: 1 comment 5 replies
-
Try #[cfg(target_os = "macos")]
app_handle.tray_handle().set_title(title).unwrap(); |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
FabianLars
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try
#[cfg(target_os = "macos")]
. for example: