Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add an x mark icon to the list of contacts
Petros Amoiridisdb978fcb6cf0
diff --git a/crates/collab_ui/src/contact_list.rs b/crates/collab_ui/src/contact_list.rsindex 743b98adb00..e2f5e50cdbf 100644--- a/crates/collab_ui/src/contact_list.rs+++ b/crates/collab_ui/src/contact_list.rs@@ -1051,7 +1051,7 @@ impl ContactList {let user_id = contact.user.id;let initial_project = project.clone();let mut element =- MouseEventHandler::<Contact>::new(contact.user.id as usize, cx, |_, _| {+ MouseEventHandler::<Contact>::new(contact.user.id as usize, cx, |_, cx| {Flex::row().with_children(contact.user.avatar.clone().map(|avatar| {let status_badge = if contact.online {@@ -1093,6 +1093,27 @@ impl ContactList {.flex(1., true).boxed(),)+ .with_child(+ MouseEventHandler::<Cancel>::new(+ contact.user.id as usize,+ cx,+ |mouse_state, _| {+ let button_style =+ theme.contact_button.style_for(mouse_state, false);+ render_icon_button(button_style, "icons/x_mark_8.svg")+ .aligned()+ .flex_float()+ .boxed()+ },+ )+ .with_padding(Padding::uniform(2.))+ .with_cursor_style(CursorStyle::PointingHand)+ .on_click(MouseButton::Left, move |_, cx| {+ cx.dispatch_action(RemoveContact(user_id))+ })+ .flex_float()+ .boxed(),+ ).with_children(if calling {Some(Label::new("Calling".to_string(), theme.calling_indicator.text.clone())