Replace event::Status in Widget::on_event with Shell::capture_event

This commit is contained in:
Héctor Ramón Jiménez 2024-10-25 19:28:18 +02:00
parent 752403d70c
commit dcc184b01b
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F
44 changed files with 560 additions and 709 deletions

View file

@ -22,7 +22,6 @@
//! }
//! ```
use crate::container;
use crate::core::event::{self, Event};
use crate::core::layout::{self, Layout};
use crate::core::mouse;
use crate::core::overlay;
@ -30,8 +29,8 @@ use crate::core::renderer;
use crate::core::text;
use crate::core::widget::{self, Widget};
use crate::core::{
Clipboard, Element, Length, Padding, Pixels, Point, Rectangle, Shell, Size,
Vector,
Clipboard, Element, Event, Length, Padding, Pixels, Point, Rectangle,
Shell, Size, Vector,
};
/// An element to display a widget over another.
@ -200,7 +199,7 @@ where
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
) -> event::Status {
) {
let state = tree.state.downcast_mut::<State>();
let was_idle = *state == State::Idle;
@ -225,7 +224,7 @@ where
clipboard,
shell,
viewport,
)
);
}
fn mouse_interaction(