Skip to content

Commit

Permalink
Hide the window on Windows + added a tooltip for better identifying d…
Browse files Browse the repository at this point in the history
…ev apps
  • Loading branch information
calebsmithdev committed Dec 1, 2024
1 parent 6956093 commit 6038b89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src-tauri/src/system_tray_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn build_system_tray_menu(handle: &AppHandle) -> tauri::Result<()> {
)?)
.build()?;

TrayIconBuilder::new()
let mut tray_icon_builder = TrayIconBuilder::new()
.menu(&menu)
.menu_on_left_click(is_macos)
.icon(handle.default_window_icon().unwrap().clone())
Expand Down Expand Up @@ -92,7 +92,14 @@ pub fn build_system_tray_menu(handle: &AppHandle) -> tauri::Result<()> {
}
}
_ => {}
})
.build(handle)?;
});

if cfg!(debug_assertions) {
tray_icon_builder = tray_icon_builder.tooltip("Dev Mode");
} else {
tray_icon_builder = tray_icon_builder.tooltip("WoWthing Sync");
}

tray_icon_builder.build(handle)?;
Ok(())
}
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"resizable": false,
"title": "WoWthing Sync",
"decorations": true,
"useHttpsScheme": true
"useHttpsScheme": true,
"visible": false
}
],
"withGlobalTauri": false,
Expand Down

0 comments on commit 6038b89

Please sign in to comment.