fix: menu bar and flex row event handling
This commit is contained in:
parent
93527e6321
commit
d6bdb3fdae
2 changed files with 28 additions and 27 deletions
|
|
@ -160,11 +160,12 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for FlexR
|
|||
shell: &mut Shell<'_, Message>,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
self.children
|
||||
for ((child, state), c_layout) in self
|
||||
.children
|
||||
.iter_mut()
|
||||
.zip(&mut tree.children)
|
||||
.zip(layout.children())
|
||||
.map(|((child, state), c_layout)| {
|
||||
{
|
||||
child.as_widget_mut().update(
|
||||
state,
|
||||
event,
|
||||
|
|
@ -174,8 +175,8 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for FlexR
|
|||
clipboard,
|
||||
shell,
|
||||
viewport,
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn mouse_interaction(
|
||||
|
|
|
|||
|
|
@ -810,11 +810,11 @@ fn process_root_events<Message>(
|
|||
shell: &mut Shell<'_, Message>,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
menu_roots
|
||||
for ((root, t), lo) in menu_roots
|
||||
.iter_mut()
|
||||
.zip(&mut tree.children)
|
||||
.zip(layout.children())
|
||||
.map(|((root, t), lo)| {
|
||||
{
|
||||
// assert!(t.tag == tree::Tag::stateless());
|
||||
root.item.update(
|
||||
&mut t.children[root.index],
|
||||
|
|
@ -825,6 +825,6 @@ fn process_root_events<Message>(
|
|||
clipboard,
|
||||
shell,
|
||||
viewport,
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue