Introduce Renderer argument to mouse_interaction and on_event
This commit is contained in:
parent
6ab4611a6e
commit
810e086728
24 changed files with 165 additions and 58 deletions
|
|
@ -169,6 +169,7 @@ where
|
|||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
viewport: &Rectangle,
|
||||
renderer: &Renderer,
|
||||
) -> mouse::Interaction {
|
||||
self.children
|
||||
.iter()
|
||||
|
|
@ -178,6 +179,7 @@ where
|
|||
layout,
|
||||
cursor_position,
|
||||
viewport,
|
||||
renderer,
|
||||
)
|
||||
})
|
||||
.max()
|
||||
|
|
@ -217,11 +219,14 @@ where
|
|||
fn overlay(
|
||||
&mut self,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
) -> Option<overlay::Element<'_, Message, Renderer>> {
|
||||
self.children
|
||||
.iter_mut()
|
||||
.zip(layout.children())
|
||||
.filter_map(|(child, layout)| child.widget.overlay(layout))
|
||||
.filter_map(|(child, layout)| {
|
||||
child.widget.overlay(layout, renderer)
|
||||
})
|
||||
.next()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue