You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building complex menu means complex on_menu_event, keeping track of event names, etc.
Describe the solution you'd like
Build the event handler directly when creating a menu item. Something like:
let view_menu = SubmenuBuilder::new(app_handle,"View").item(&MenuItemBuilder::new("Jump to playing track").id(MenuId::new("jump_to_playing_track")).accelerator("CmdOrCtrl+T").handler(|app_handler| {// HERE (triggered on click + accelearator)
app_handler.get_webview_window("main").unwrap().emit("hey_yah")}).build(app_handle).unwrap(),).build().unwrap();
Alternatives considered
none.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
Building complex menu means complex
on_menu_event
, keeping track of event names, etc.Describe the solution you'd like
Build the event handler directly when creating a menu item. Something like:
Alternatives considered
none.
Additional context
No response
The text was updated successfully, but these errors were encountered: