diff options
author | 2020-11-12 00:09:52 +0100 | |
---|---|---|
committer | 2020-11-12 00:09:52 +0100 | |
commit | 3f968b8c876b7c2351232856887fb9c3e3db3130 (patch) | |
tree | 0d8c04a09e2da877bb823bc039a57d4222fb1346 /native/src/widget/row.rs | |
parent | 1db11ba69a3183924a1f4cae91031f4c5051b6dc (diff) | |
download | iced-3f968b8c876b7c2351232856887fb9c3e3db3130.tar.gz iced-3f968b8c876b7c2351232856887fb9c3e3db3130.tar.bz2 iced-3f968b8c876b7c2351232856887fb9c3e3db3130.zip |
Make `Widget::on_event` return an `event::Status`
Diffstat (limited to 'native/src/widget/row.rs')
-rw-r--r-- | native/src/widget/row.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index bc8a3df1..7d7595f7 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,19 +162,21 @@ where messages: &mut Vec<Message>, renderer: &Renderer, clipboard: Option<&dyn Clipboard>, - ) { + ) -> event::Status { self.children.iter_mut().zip(layout.children()).for_each( |(child, layout)| { - child.widget.on_event( + let _ = child.widget.on_event( event.clone(), layout, cursor_position, messages, renderer, clipboard, - ) + ); }, ); + + event::Status::Ignored } fn draw( |