Fix cursor styles not displaying properly (#3493)

This PR fixes an issue where an element with a cursor style set would
not update the cursor when hovering over it.

Previously the cursor style would only appear by interacting with the
element in some way, for instance, by clicking on the element or by
having a `.hover` with some other style being applied.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2023-12-04 16:40:53 -05:00
committed by GitHub
parent 059959a4ab
commit c10d8a8110
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -866,6 +866,7 @@ impl Interactivity {
}
if self.hover_style.is_some()
|| self.base_style.mouse_cursor.is_some()
|| cx.active_drag.is_some() && !self.drag_over_styles.is_empty()
{
let bounds = bounds.intersect(&cx.content_mask().bounds);
-1
View File
@@ -102,7 +102,6 @@ impl Render for CursorStory {
.w_64()
.h_8()
.bg(gpui::red())
.hover(|style| style.bg(gpui::blue()))
.active(|style| style.bg(gpui::green()))
.text_sm()
.child(Story::label(name)),