Allow hovering over tooltips in git blame sidebar (#10466)

This introduces a new API on `StatefulInteractiveElement` to create a
tooltip that can be hovered, scrolled inside, and clicked:
`.hoverable_tooltip`.

Right now we only use it in the `git blame` gutter, but the plan is to
use the new hover/click/scroll behavior in #10398 to introduce new
git-blame-tooltips.

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Thorsten Ball 2024-04-12 11:47:32 +02:00 committed by GitHub
parent bc0c2e0cae
commit 6e1ba7e936
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 190 additions and 52 deletions

View file

@ -1416,8 +1416,8 @@ pub struct AnyTooltip {
/// The view used to display the tooltip
pub view: AnyView,
/// The offset from the cursor to use, relative to the parent view
pub cursor_offset: Point<Pixels>,
/// The absolute position of the mouse when the tooltip was deployed.
pub mouse_position: Point<Pixels>,
}
/// A keystroke event, and potentially the associated action