Add viewport to Widget::on_event

This commit is contained in:
Cory Forsstrom 2023-07-15 10:04:25 -07:00
parent e462f48a5a
commit 42c423b4a8
30 changed files with 77 additions and 5 deletions

View file

@ -268,8 +268,11 @@ where
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
) -> event::Status {
let bounds = layout.bounds();
self.container.on_event(
self.state, event, layout, cursor, renderer, clipboard, shell,
&bounds,
)
}
@ -377,6 +380,7 @@ where
renderer: &Renderer,
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle,
) -> event::Status {
match event {
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {