diff options
author | 2020-04-18 14:42:48 +0200 | |
---|---|---|
committer | 2020-07-08 10:59:56 +0200 | |
commit | afd9274de26ccf65285df02007b4ddb697bea9a3 (patch) | |
tree | afc8e452251db84a132367753104613d2d4567b7 /native/src/user_interface.rs | |
parent | b1afadf1a2162e236525c466b6b3099a2623a2de (diff) | |
download | iced-afd9274de26ccf65285df02007b4ddb697bea9a3.tar.gz iced-afd9274de26ccf65285df02007b4ddb697bea9a3.tar.bz2 iced-afd9274de26ccf65285df02007b4ddb697bea9a3.zip |
Draft `ComboBox` and `Menu` layer
Diffstat (limited to 'native/src/user_interface.rs')
-rw-r--r-- | native/src/user_interface.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 6758bce3..12cea684 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -217,6 +217,14 @@ where for event in events { if let Some(overlay) = &mut self.overlay { + let base_cursor = + if overlay.layout.bounds().contains(cursor_position) { + // TODO: Encode cursor availability + Point::new(-1.0, -1.0) + } else { + cursor_position + }; + overlay.root.on_event( event.clone(), Layout::new(&overlay.layout), @@ -226,14 +234,6 @@ where clipboard, ); - let base_cursor = - if overlay.layout.bounds().contains(cursor_position) { - // TODO: Encode cursor availability - Point::new(-1.0, -1.0) - } else { - cursor_position - }; - self.base.root.widget.on_event( event, Layout::new(&self.base.layout), |