Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix all Picker Item cursor to use `Pointer`. (#8877)

Jason Leefae5e83d93c9
diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs
index 033f6c76616..11c2458ee1d 100644
--- a/crates/picker/src/picker.rs
+++ b/crates/picker/src/picker.rs
@@ -325,6 +325,7 @@ impl<D: PickerDelegate> Picker<D> {
fn render_element(&self, cx: &mut ViewContext<Self>, ix: usize) -> impl IntoElement {
div()
.id(("item", ix))
+ .cursor_pointer()
.on_click(cx.listener(move |this, event: &ClickEvent, cx| {
this.handle_click(ix, event.down.modifiers.command, cx)
}))
diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs
index f2d0ad0f848..76d42c27809 100644
--- a/crates/recent_projects/src/recent_projects.rs
+++ b/crates/recent_projects/src/recent_projects.rs
@@ -133,7 +133,6 @@ impl Render for RecentProjects {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
v_flex()
.w(rems(self.rem_width))
- .cursor_pointer()
.child(self.picker.clone())
.on_mouse_down_out(cx.listener(|this, _, cx| {
this.picker.update(cx, |this, cx| {
diff --git a/crates/vcs_menu/src/lib.rs b/crates/vcs_menu/src/lib.rs
index bd27a51bc0a..2f88328084b 100644
--- a/crates/vcs_menu/src/lib.rs
+++ b/crates/vcs_menu/src/lib.rs
@@ -67,7 +67,6 @@ impl Render for BranchList {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
v_flex()
.w(rems(self.rem_width))
- .cursor_pointer()
.child(self.picker.clone())
.on_mouse_down_out(cx.listener(|this, _, cx| {
this.picker.update(cx, |this, cx| {