Automatically reset cursor style when hit test changes (#9289)

Release Notes:

- N/A

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-03-13 17:21:25 +01:00 committed by GitHub
parent 7f0e373358
commit 139bb3275a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 22 deletions

View file

@ -941,8 +941,6 @@ mod element {
let flexes = self.flexes.clone();
let child_bounds = child.bounds;
let axis = self.axis;
let handle_hitbox = handle.hitbox.clone();
let was_hovered = handle_hitbox.is_hovered(cx);
move |e: &MouseMoveEvent, phase, cx| {
let dragged_handle = dragged_handle.borrow();
if phase.bubble() {
@ -957,8 +955,6 @@ mod element {
workspace.clone(),
cx,
)
} else if was_hovered != handle_hitbox.is_hovered(cx) {
cx.refresh();
}
}
}