summaryrefslogtreecommitdiffstats
path: root/native/src/widget/row.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-11-14 02:17:21 +0100
committerLibravatar GitHub <noreply@github.com>2020-11-14 02:17:21 +0100
commit62295f554b885b8d486b666bc10dc4ecdc78c7d6 (patch)
tree4758f6f17301b1a6c252a5a32248ae5498d1bb11 /native/src/widget/row.rs
parent73811c394a39c3816c67bffd2cf7d7a93c8803a9 (diff)
parentbf2d2561b8dde3e160438428b59c03c38a5f752a (diff)
downloadiced-62295f554b885b8d486b666bc10dc4ecdc78c7d6.tar.gz
iced-62295f554b885b8d486b666bc10dc4ecdc78c7d6.tar.bz2
iced-62295f554b885b8d486b666bc10dc4ecdc78c7d6.zip
Merge pull request #614 from hecrj/feature/event-capturing
Event capturing
Diffstat (limited to 'native/src/widget/row.rs')
-rw-r--r--native/src/widget/row.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs
index bc8a3df1..6b09d0c8 100644
--- a/native/src/widget/row.rs
+++ b/native/src/widget/row.rs
@@ -1,9 +1,9 @@
//! Distribute content horizontally.
+use crate::event::{self, Event};
use crate::layout;
use crate::overlay;
use crate::{
- Align, Clipboard, Element, Event, Hasher, Layout, Length, Point, Rectangle,
- Widget,
+ Align, Clipboard, Element, Hasher, Layout, Length, Point, Rectangle, Widget,
};
use std::hash::Hash;
@@ -162,9 +162,11 @@ where
messages: &mut Vec<Message>,
renderer: &Renderer,
clipboard: Option<&dyn Clipboard>,
- ) {
- self.children.iter_mut().zip(layout.children()).for_each(
- |(child, layout)| {
+ ) -> event::Status {
+ self.children
+ .iter_mut()
+ .zip(layout.children())
+ .map(|(child, layout)| {
child.widget.on_event(
event.clone(),
layout,
@@ -173,8 +175,8 @@ where
renderer,
clipboard,
)
- },
- );
+ })
+ .fold(event::Status::Ignored, event::Status::merge)
}
fn draw(