summaryrefslogtreecommitdiffstats
path: root/widget/src/container.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2024-11-13 17:08:26 +0100
committerLibravatar GitHub <noreply@github.com>2024-11-13 17:08:26 +0100
commita11fcf8f2dde551335c6f34788393fa2e8f8a362 (patch)
tree1e423c847a6505a2582bec19908866dba94c436d /widget/src/container.rs
parent42a2cb6d4f78343f43d6a68a28e5502d9426ed2c (diff)
parent28ec6df8f0ebf96966bee61caf5a325695314b7a (diff)
downloadiced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.tar.gz
iced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.tar.bz2
iced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.zip
Merge pull request #2662 from iced-rs/reactive-rendering
Reactive Rendering
Diffstat (limited to 'widget/src/container.rs')
-rw-r--r--widget/src/container.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/widget/src/container.rs b/widget/src/container.rs
index f4993ac9..b7b2b39e 100644
--- a/widget/src/container.rs
+++ b/widget/src/container.rs
@@ -21,7 +21,6 @@
//! ```
use crate::core::alignment::{self, Alignment};
use crate::core::border::{self, Border};
-use crate::core::event::{self, Event};
use crate::core::gradient::{self, Gradient};
use crate::core::layout;
use crate::core::mouse;
@@ -30,7 +29,7 @@ use crate::core::renderer;
use crate::core::widget::tree::{self, Tree};
use crate::core::widget::{self, Operation};
use crate::core::{
- self, color, Background, Clipboard, Color, Element, Layout, Length,
+ self, color, Background, Clipboard, Color, Element, Event, Layout, Length,
Padding, Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector,
Widget,
};
@@ -298,7 +297,7 @@ where
);
}
- fn on_event(
+ fn update(
&mut self,
tree: &mut Tree,
event: Event,
@@ -308,8 +307,8 @@ where
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
- ) -> event::Status {
- self.content.as_widget_mut().on_event(
+ ) {
+ self.content.as_widget_mut().update(
tree,
event,
layout.children().next().unwrap(),
@@ -318,7 +317,7 @@ where
clipboard,
shell,
viewport,
- )
+ );
}
fn mouse_interaction(