Introduce a short-term solution for flickering (#8542)
This uses bounds checking alone to determine hover state to avoid flicker. It's a short-term solution because the rendering is incorrect. We think this is better than flickering though and buys us some time as we work on a more robust solution overall. Release Notes: - Fixed flickering when hovering. --------- Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
517ea734ee
commit
7aba9eb4b7
7 changed files with 72 additions and 45 deletions
|
@ -489,15 +489,12 @@ impl TerminalElement {
|
|||
}
|
||||
});
|
||||
|
||||
let interactive_text_bounds = InteractiveBounds {
|
||||
bounds,
|
||||
stacking_order: cx.stacking_order().clone(),
|
||||
};
|
||||
if interactive_text_bounds.visibly_contains(&cx.mouse_position(), cx) {
|
||||
if bounds.contains(&cx.mouse_position()) {
|
||||
let stacking_order = cx.stacking_order().clone();
|
||||
if self.can_navigate_to_selected_word && last_hovered_word.is_some() {
|
||||
cx.set_cursor_style(gpui::CursorStyle::PointingHand)
|
||||
cx.set_cursor_style(gpui::CursorStyle::PointingHand, stacking_order);
|
||||
} else {
|
||||
cx.set_cursor_style(gpui::CursorStyle::IBeam)
|
||||
cx.set_cursor_style(gpui::CursorStyle::IBeam, stacking_order);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue