diff --git a/assets/icons/user_check.svg b/assets/icons/user_check.svg new file mode 100644 index 0000000000..e5f13feeb4 --- /dev/null +++ b/assets/icons/user_check.svg @@ -0,0 +1 @@ + diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index a5bd4a0a15..6d2cc2542c 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -2755,18 +2755,26 @@ impl GitPanel { pub(crate) fn render_co_authors(&self, cx: &Context) -> Option { let potential_co_authors = self.potential_co_authors(cx); + + let (tooltip_label, icon) = if self.add_coauthors { + ("Add co-authored-by", IconName::UserCheck) + } else { + ("Remove co-authored-by", IconName::Person) + }; + if potential_co_authors.is_empty() { None } else { Some( - IconButton::new("co-authors", IconName::Person) + IconButton::new("co-authors", icon) .shape(ui::IconButtonShape::Square) .icon_color(Color::Disabled) .selected_icon_color(Color::Selected) .toggle_state(self.add_coauthors) .tooltip(move |_, cx| { let title = format!( - "Add co-authored-by:{}{}", + "{}:{}{}", + tooltip_label, if potential_co_authors.len() == 1 { "" } else { diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rs index f7b15dbfcd..32ee3f80ef 100644 --- a/crates/icons/src/icons.rs +++ b/crates/icons/src/icons.rs @@ -238,6 +238,7 @@ pub enum IconName { Undo, Unpin, Update, + UserCheck, UserGroup, UserRoundPen, Visible,