fix: update for applet widgets and grid

This commit is contained in:
Ashley Wulber 2026-02-22 21:57:15 -05:00
parent dfa7d89915
commit a7027e6119
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
3 changed files with 76 additions and 73 deletions

View file

@ -320,12 +320,13 @@ where
}
}
self.children
for (((i, child), state), c_layout) in self
.children
.iter_mut()
.enumerate()
.zip(&mut tree.children)
.zip(layout.children())
.map(|(((i, child), state), c_layout)| {
{
let mut cursor_virtual = cursor;
if matches!(
event,
@ -360,8 +361,8 @@ where
clipboard,
shell,
viewport,
)
});
);
}
}
fn mouse_interaction(

View file

@ -309,12 +309,13 @@ where
}
}
self.children
for (((i, child), state), c_layout) in self
.children
.iter_mut()
.enumerate()
.zip(&mut tree.children)
.zip(layout.children())
.map(|(((i, child), state), c_layout)| {
{
let mut cursor_virtual = cursor;
if matches!(
@ -350,8 +351,8 @@ where
clipboard,
shell,
viewport,
)
});
);
}
}
fn mouse_interaction(

View file

@ -189,11 +189,12 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for Grid<
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,
@ -203,8 +204,8 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for Grid<
clipboard,
shell,
viewport,
)
});
);
}
}
fn mouse_interaction(