Implement Widget::mouse_interaction for TextInput

This commit is contained in:
Héctor Ramón Jiménez 2021-10-20 18:45:45 +07:00
parent e914888f57
commit cc560aca18
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -580,6 +580,19 @@ where
event::Status::Ignored
}
fn mouse_interaction(
&self,
layout: Layout<'_>,
_viewport: &Rectangle,
cursor_position: Point,
) -> mouse::Interaction {
if layout.bounds().contains(cursor_position) {
mouse::Interaction::Text
} else {
mouse::Interaction::default()
}
}
fn draw(
&self,
renderer: &mut Renderer,