mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
Fixing menu bar code
This commit is contained in:
parent
9ba4c26e6c
commit
4b9d317fd5
1 changed files with 6 additions and 2 deletions
|
|
@ -3164,7 +3164,9 @@ fn compile_builtin_function_call(
|
|||
quote!()
|
||||
} else {
|
||||
quote!(if sp::WindowInner::from_pub(#window_adapter_tokens.window()).supports_native_menu_bar() {
|
||||
sp::WindowInner::from_pub(#window_adapter_tokens.window()).setup_menubar(sp::VBox::new(menu_item_tree));
|
||||
let menu_item_tree = sp::VRc::new(menu_item_tree);
|
||||
let menu_item_tree = sp::VRc::into_dyn(menu_item_tree);
|
||||
sp::WindowInner::from_pub(#window_adapter_tokens.window()).setup_menubar(menu_item_tree);
|
||||
} else)
|
||||
};
|
||||
|
||||
|
|
@ -3223,7 +3225,9 @@ fn compile_builtin_function_call(
|
|||
#activated.call(&(entry.clone(),))
|
||||
}
|
||||
}
|
||||
sp::WindowInner::from_pub(#window_adapter_tokens.window()).setup_menubar(sp::VBox::new(MenuBarWrapper(_self.self_weak.get().unwrap().clone())));
|
||||
let menubar = sp::VRc::new(MenuBarWrapper(_self.self_weak.get().unwrap().clone()));
|
||||
let menubar = sp::VRc::into_dyn(menubar);
|
||||
sp::WindowInner::from_pub(#window_adapter_tokens.window()).setup_menubar(menubar);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue