feat(native): add Tooltip widget

This commit is contained in:
Yusuf Bera Ertan 2020-07-28 18:07:46 +03:00
parent 4de164dcc7
commit a19f89d3a6
No known key found for this signature in database
GPG key ID: 1D8F8FAF2294D6EA
23 changed files with 580 additions and 18 deletions

View file

@ -198,11 +198,19 @@ where
fn overlay(
&mut self,
layout: Layout<'_>,
overlay_content_bounds: Option<Rectangle>,
cursor_position: Point,
) -> Option<overlay::Element<'_, Message, Renderer>> {
self.children
.iter_mut()
.zip(layout.children())
.filter_map(|(child, layout)| child.widget.overlay(layout))
.filter_map(|(child, layout)| {
child.widget.overlay(
layout,
overlay_content_bounds,
cursor_position,
)
})
.next()
}
}