Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created January 10, 2023 22:49
Show Gist options
  • Save deleteman/067eecf62f84fd0af4933079a3dce69c to your computer and use it in GitHub Desktop.
Save deleteman/067eecf62f84fd0af4933079a3dce69c to your computer and use it in GitHub Desktop.
let new_todo = CustomMenuItem::new("new".to_string(), "New ToDo");
let close = CustomMenuItem::new("quit".to_string(), "Quit");
let submenu = Submenu::new("File", Menu::new().add_item(new_todo).add_item(close));
let menu = Menu::new()
.add_native_item(MenuItem::Copy)
.add_item(CustomMenuItem::new("hide", "Hide"))
.add_submenu(submenu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment