Tooltip on tabs

Co-Authored-By: Julia <julia@zed.dev>
This commit is contained in:
Conrad Irwin 2023-11-03 14:02:46 -06:00
parent 26e64fb843
commit 33245d119e
6 changed files with 77 additions and 7 deletions

View file

@ -987,6 +987,14 @@ impl<'a> WindowContext<'a> {
cx.active_drag = Some(active_drag);
});
});
} else if let Some(active_tooltip) = self.app.active_tooltip.take() {
self.stack(1, |cx| {
cx.with_element_offset(Some(cx.mouse_position()), |cx| {
let available_space =
size(AvailableSpace::MinContent, AvailableSpace::MinContent);
active_tooltip.draw(available_space, cx);
});
});
}
self.window.root_view = Some(root_view);