Replace content with title in menu module

This commit is contained in:
Héctor Ramón Jiménez 2021-07-19 21:01:24 +07:00
parent 3099f36100
commit a2f49a74d0
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 22 additions and 29 deletions

View file

@ -187,19 +187,17 @@ pub fn menu<Message>(menu: &Menu<Message>) -> winit::window::Menu {
for item in menu.iter() {
match item {
menu::Entry::Item {
content, hotkey, ..
} => {
converted.add_item(id, content, hotkey.map(self::hotkey));
menu::Entry::Item { title, hotkey, .. } => {
converted.add_item(id, title, hotkey.map(self::hotkey));
id += 1;
}
menu::Entry::Dropdown { content, submenu } => {
menu::Entry::Dropdown { title, submenu } => {
let mut converted_submenu = winit::window::Menu::new();
let n_children =
menu_i(&mut converted_submenu, id, submenu);
converted.add_dropdown(content, converted_submenu);
converted.add_dropdown(title, converted_submenu);
id += n_children;
}