From 67be6a7a6ad0154215413b751435bb426a795bd1 Mon Sep 17 00:00:00 2001 From: Martichou Date: Sat, 2 Mar 2024 19:32:24 +0100 Subject: [PATCH] fix: icon in systemtray is now ok Signed-off-by: Martichou --- frontend/src-tauri/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src-tauri/src/main.rs b/frontend/src-tauri/src/main.rs index 8efb519..000b45b 100644 --- a/frontend/src-tauri/src/main.rs +++ b/frontend/src-tauri/src/main.rs @@ -13,7 +13,7 @@ use rqs_lib::channel::{ChannelAction, ChannelDirection, ChannelMessage}; use rqs_lib::{EndpointInfo, SendInfo, State, RQS}; use tauri::menu::{MenuBuilder, MenuItemBuilder}; use tauri::tray::TrayIconBuilder; -use tauri::{AppHandle, Manager}; +use tauri::{AppHandle, Icon, Manager}; use tauri_plugin_autostart::MacosLauncher; use tokio::sync::{broadcast, mpsc}; @@ -89,6 +89,7 @@ async fn main() -> Result<(), anyhow::Error> { let quit = MenuItemBuilder::with_id("quit", "Quit").build(app)?; let menu = MenuBuilder::new(app).items(&[&show, &quit]).build()?; let _tray = TrayIconBuilder::new() + .icon(Icon::Raw(include_bytes!("../icons/icon.png").to_vec())) .menu(&menu) .on_menu_event(move |app, event| match event.id().as_ref() { "show" => {