From fae5e83d93c9dfc794e0d80e4f9df95b78a576b8 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 5 Mar 2024 17:32:57 +0800 Subject: [PATCH] Fix all Picker Item cursor to use `Pointer`. (#8877) Before: https://github.com/zed-industries/zed/assets/5518/84874858-7847-4fa4-b7a3-41ecc65a2f7d After: https://github.com/zed-industries/zed/assets/5518/d395ea96-aa26-4de1-8bfc-73cc43ee75cf Release Notes: - Made picker items to use `Pointer` cursor style --- crates/picker/src/picker.rs | 1 + crates/recent_projects/src/recent_projects.rs | 1 - crates/vcs_menu/src/lib.rs | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs index 033f6c7661..11c2458ee1 100644 --- a/crates/picker/src/picker.rs +++ b/crates/picker/src/picker.rs @@ -325,6 +325,7 @@ impl Picker { fn render_element(&self, cx: &mut ViewContext, 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 f2d0ad0f84..76d42c2780 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) -> 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 bd27a51bc0..2f88328084 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) -> 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| {