Store and synchronize Menu in application::State

This commit is contained in:
Héctor Ramón Jiménez 2021-07-12 22:28:18 +02:00
parent b3ff522c18
commit 31997d255f
No known key found for this signature in database
GPG key ID: 44B88EB52AB1EE8D
5 changed files with 64 additions and 13 deletions

View file

@ -177,7 +177,7 @@ fn hotkey(hotkey: keyboard::Hotkey) -> winit::window::Hotkey {
///
/// [`winit`]: https://github.com/rust-windowing/winit
/// [`iced_native`]: https://github.com/hecrj/iced/tree/master/native
pub fn menu<Message>(menu: Menu<Message>) -> winit::window::Menu {
pub fn menu<Message>(menu: &Menu<Message>) -> winit::window::Menu {
let mut converted = winit::window::Menu::new();
for item in menu.iter() {