Skip to content

Commit

Permalink
feat: add back name inside tray menu on v2
Browse files Browse the repository at this point in the history
Signed-off-by: Martichou <m@rtin.fyi>
  • Loading branch information
Martichou committed Jul 3, 2024
1 parent 20606d2 commit 373460e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/main/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ async fn main() -> Result<(), anyhow::Error> {
debug!("Starting setup of RQuickShare app");

// Initialize system Tray
let name = MenuItemBuilder::new("RQuickShare")
.enabled(false)
.build(app)?;
let show = MenuItemBuilder::with_id("show", "Show").build(app)?;
let quit = MenuItemBuilder::with_id("quit", "Quit").build(app)?;
let menu = MenuBuilder::new(app).items(&[&show, &quit]).build()?;
let menu = MenuBuilder::new(app)
.item(&name)
.separator()
.items(&[&show, &quit])
.build()?;
let _tray = TrayIconBuilder::new()
.icon(Image::from_bytes(include_bytes!("../icons/icon.png")).unwrap())
.menu(&menu)
Expand Down

0 comments on commit 373460e

Please # to comment.