Simplify Hotkey conversion in conversion::menu
This commit is contained in:
parent
b57d567981
commit
b3ff522c18
1 changed files with 1 additions and 6 deletions
|
|
@ -185,12 +185,7 @@ pub fn menu<Message>(menu: Menu<Message>) -> winit::window::Menu {
|
||||||
menu::Entry::Item {
|
menu::Entry::Item {
|
||||||
content, hotkey, ..
|
content, hotkey, ..
|
||||||
} => {
|
} => {
|
||||||
let hotkey: Option<&keyboard::Hotkey> = hotkey.as_ref().into();
|
converted.add_item(0, content, hotkey.map(self::hotkey));
|
||||||
converted.add_item(
|
|
||||||
0,
|
|
||||||
content,
|
|
||||||
hotkey.map(|h| self::hotkey(*h)),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
menu::Entry::Dropdown { content, submenu } => {
|
menu::Entry::Dropdown { content, submenu } => {
|
||||||
converted.add_dropdown(content, self::menu(submenu));
|
converted.add_dropdown(content, self::menu(submenu));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue