summaryrefslogtreecommitdiffstats
path: root/widget/src/lazy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/lazy.rs')
-rw-r--r--widget/src/lazy.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/widget/src/lazy.rs b/widget/src/lazy.rs
index 232f254c..07b90c93 100644
--- a/widget/src/lazy.rs
+++ b/widget/src/lazy.rs
@@ -10,7 +10,6 @@ pub use responsive::Responsive;
mod cache;
-use crate::core::event::{self, Event};
use crate::core::layout::{self, Layout};
use crate::core::mouse;
use crate::core::overlay;
@@ -19,7 +18,7 @@ use crate::core::widget::tree::{self, Tree};
use crate::core::widget::{self, Widget};
use crate::core::Element;
use crate::core::{
- self, Clipboard, Length, Point, Rectangle, Shell, Size, Vector,
+ self, Clipboard, Event, Length, Point, Rectangle, Shell, Size, Vector,
};
use crate::runtime::overlay::Nested;
@@ -196,7 +195,7 @@ where
});
}
- fn on_event(
+ fn update(
&mut self,
tree: &mut Tree,
event: Event,
@@ -206,9 +205,9 @@ where
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
- ) -> event::Status {
+ ) {
self.with_element_mut(|element| {
- element.as_widget_mut().on_event(
+ element.as_widget_mut().update(
&mut tree.children[0],
event,
layout,
@@ -217,8 +216,8 @@ where
clipboard,
shell,
viewport,
- )
- })
+ );
+ });
}
fn mouse_interaction(
@@ -387,7 +386,7 @@ where
.unwrap_or_default()
}
- fn on_event(
+ fn update(
&mut self,
event: Event,
layout: Layout<'_>,
@@ -395,11 +394,10 @@ where
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
- ) -> event::Status {
- self.with_overlay_mut_maybe(|overlay| {
- overlay.on_event(event, layout, cursor, renderer, clipboard, shell)
- })
- .unwrap_or(event::Status::Ignored)
+ ) {
+ let _ = self.with_overlay_mut_maybe(|overlay| {
+ overlay.update(event, layout, cursor, renderer, clipboard, shell);
+ });
}
fn is_over(