mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Experimental support for MenuBar
Introduces `MenuBar{ ... }` that can be put in a Window
This commit is contained in:
parent
20443ec0df
commit
5bd20def0e
38 changed files with 1023 additions and 69 deletions
|
@ -261,6 +261,9 @@ impl Snapshotter {
|
|||
document.inner_components.iter().for_each(|ic| {
|
||||
let _ = self.create_component(ic);
|
||||
});
|
||||
if let Some(popup_menu_impl) = &document.popup_menu_impl {
|
||||
let _ = self.create_component(popup_menu_impl);
|
||||
}
|
||||
}
|
||||
|
||||
fn snapshot_document(&mut self, document: &object_tree::Document) -> object_tree::Document {
|
||||
|
@ -284,6 +287,10 @@ impl Snapshotter {
|
|||
exports,
|
||||
embedded_file_resources: document.embedded_file_resources.clone(),
|
||||
used_types: RefCell::new(self.snapshot_used_sub_types(&document.used_types.borrow())),
|
||||
popup_menu_impl: document.popup_menu_impl.as_ref().map(|p| {
|
||||
Weak::upgrade(&self.use_component(p))
|
||||
.expect("Components can get upgraded at this point")
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue