fix: menu bar and flex row event handling

This commit is contained in:
Ashley Wulber 2026-02-22 22:47:28 -05:00
parent 7554540b78
commit 89ee66f251
2 changed files with 28 additions and 27 deletions

View file

@ -160,22 +160,23 @@ 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,
c_layout.with_virtual_offset(layout.virtual_offset()),
cursor,
renderer,
clipboard,
shell,
viewport,
)
});
{
child.as_widget_mut().update(
state,
event,
c_layout.with_virtual_offset(layout.virtual_offset()),
cursor,
renderer,
clipboard,
shell,
viewport,
);
}
}
fn mouse_interaction(