Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
recent_projects: Simplify folder addition affordances (#51841)
Danilo Leal4642413b02bf
diff --git a/assets/icons/folder_plus.svg b/assets/icons/folder_plus.svgnew file mode 100644index 00000000000..a543448ed61--- /dev/null+++ b/assets/icons/folder_plus.svg@@ -0,0 +1,5 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M8 7.29524V10.6536" stroke="#C6CAD0" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>+<path d="M6.3208 8.97442H9.67917" stroke="#C6CAD0" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>+<path d="M12.8 13C13.1183 13 13.4235 12.8761 13.6486 12.6554C13.8735 12.4349 14 12.1356 14 11.8236V5.94118C14 5.62916 13.8735 5.32992 13.6486 5.10929C13.4235 4.88866 13.1183 4.76471 12.8 4.76471H8.06C7.8593 4.76664 7.66133 4.71919 7.48418 4.6267C7.30703 4.53421 7.15637 4.39964 7.046 4.2353L6.56 3.52941C6.45073 3.36675 6.30199 3.23322 6.1271 3.14082C5.95221 3.04842 5.75666 3.00004 5.558 3H3.2C2.88174 3 2.57651 3.12395 2.35148 3.34458C2.12643 3.56521 2 3.86445 2 4.17647V11.8236C2 12.1356 2.12643 12.4349 2.35148 12.6554C2.57651 12.8761 2.88174 13 3.2 13H12.8Z" stroke="#C6CAD0" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>+</svg>diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rsindex 70bc0fc5278..ca12f1a9038 100644--- a/crates/icons/src/icons.rs+++ b/crates/icons/src/icons.rs@@ -134,6 +134,7 @@ pub enum IconName {Flame,Folder,FolderOpen,+ FolderPlus,FolderSearch,Font,FontSize,diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rsindex ac6522eb31e..92dc632d1c3 100644--- a/crates/recent_projects/src/recent_projects.rs+++ b/crates/recent_projects/src/recent_projects.rs@@ -712,32 +712,14 @@ impl PickerDelegate for RecentProjectsDelegate {window: &mut Window,cx: &mut Context<Picker<Self>>,) -> Div {- let focus_handle = self.focus_handle.clone();-h_flex().flex_none().h_9()- .pl_2p5()- .pr_1p5()+ .px_2p5().justify_between().border_b_1().border_color(cx.theme().colors().border_variant).child(editor.render(window, cx))- .child(- IconButton::new("add_folder", IconName::Plus)- .icon_size(IconSize::Small)- .tooltip(move |_, cx| {- Tooltip::for_action_in(- "Add Project to Workspace",- &workspace::AddFolderToProject,- &focus_handle,- cx,- )- })- .on_click(|_, window, cx| {- window.dispatch_action(workspace::AddFolderToProject.boxed_clone(), cx)- }),- )}fn match_count(&self) -> usize {@@ -1169,9 +1151,9 @@ impl PickerDelegate for RecentProjectsDelegate {.gap_px().when(is_local, |this| {this.child(- IconButton::new("add_to_workspace", IconName::Plus)+ IconButton::new("add_to_workspace", IconName::FolderPlus).icon_size(IconSize::Small)- .tooltip(Tooltip::text("Add Project to Workspace"))+ .tooltip(Tooltip::text("Add Project to this Workspace")).on_click({let paths_to_add = paths_to_add.clone();cx.listener(move |picker, _event, window, cx| {