Fix inconsistent naming of tree parameter in Widget trait (#2950)

* fix inconsistent naming of tree parameter in widget trait

* rename `Tree` parameter in various usages across iced
This commit is contained in:
edwloef 2025-11-25 23:58:07 +01:00 committed by GitHub
parent 6f0b408f90
commit 6bbe189809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 127 additions and 128 deletions

View file

@ -269,14 +269,14 @@ where
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
) {
for ((child, state), layout) in self
for ((child, tree), layout) in self
.children
.iter_mut()
.zip(&mut tree.children)
.zip(layout.children())
{
child.as_widget_mut().update(
state, event, layout, cursor, renderer, clipboard, shell,
tree, event, layout, cursor, renderer, clipboard, shell,
viewport,
);
}
@ -294,10 +294,10 @@ where
.iter()
.zip(&tree.children)
.zip(layout.children())
.map(|((child, state), layout)| {
child.as_widget().mouse_interaction(
state, layout, cursor, viewport, renderer,
)
.map(|((child, tree), layout)| {
child
.as_widget()
.mouse_interaction(tree, layout, cursor, viewport, renderer)
})
.max()
.unwrap_or_default()
@ -320,7 +320,7 @@ where
viewport
};
for ((child, state), layout) in self
for ((child, tree), layout) in self
.children
.iter()
.zip(&tree.children)
@ -328,7 +328,7 @@ where
.filter(|(_, layout)| layout.bounds().intersects(viewport))
{
child.as_widget().draw(
state, renderer, theme, style, layout, cursor, viewport,
tree, renderer, theme, style, layout, cursor, viewport,
);
}
}