Draft ComboBox and Menu layer

This commit is contained in:
Héctor Ramón Jiménez 2020-04-18 14:42:48 +02:00
parent b1afadf1a2
commit afd9274de2
22 changed files with 966 additions and 150 deletions

View file

@ -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),