mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-03 13:23:00 +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!()
|
quote!()
|
||||||
} else {
|
} else {
|
||||||
quote!(if sp::WindowInner::from_pub(#window_adapter_tokens.window()).supports_native_menu_bar() {
|
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)
|
} else)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3223,7 +3225,9 @@ fn compile_builtin_function_call(
|
||||||
#activated.call(&(entry.clone(),))
|
#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 {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue