diff --git a/crates/client/src/gui/chat.rs b/crates/client/src/gui/chat.rs index 0e67881..e214c9c 100644 --- a/crates/client/src/gui/chat.rs +++ b/crates/client/src/gui/chat.rs @@ -3225,33 +3225,28 @@ fn members_column( }; let in_call: Vec<&MemberRow> = members.iter().filter(|row| row.in_voice).collect(); let join = (!chat.in_voice(community_id) && yumush.can_join_voice(community_id)).then(|| { - let empty = in_call.is_empty(); - clickable( - "margin_join", - palette, - entity_action(&entity, move |yumush, window, cx| { - yumush.toggle_voice(community_id, window, cx) - }), - ) - .h(px(if empty { size::CONTROL } else { size::CHIP })) - .px(px(if empty { space::SM } else { space::XS })) - .flex() - .items_center() - .gap(px(space::SM)) - .rounded(px(radius::MD)) - .text_color(palette.accent) - .child( - div() - .w(px(if empty { size::ICON } else { size::ICON_SM })) - .flex() - .justify_center() - .child(super::parts::small_icon(IconName::Headphones)), - ) - .child(if empty { - w().chat.join_voice - } else { - w().chat.join - }) + let action = entity_action(&entity, move |yumush, window, cx| { + yumush.toggle_voice(community_id, window, cx) + }); + if in_call.is_empty() { + return super::parts::pill("margin_join", palette.tokens, action) + .self_start() + .gap(px(space::SM)) + .text_color(palette.tokens.ground()) + .font_weight(FontWeight::SEMIBOLD) + .child(super::parts::small_icon(IconName::Headphones)) + .child(w().chat.join_voice); + } + clickable("margin_join", palette, action) + .h(px(size::CHIP)) + .px(px(space::XS)) + .flex() + .items_center() + .gap(px(space::SM)) + .rounded(px(radius::MD)) + .text_color(palette.accent) + .child(super::parts::small_icon(IconName::Headphones)) + .child(w().chat.join) }); let call = if in_call.is_empty() { join.map(|join| div().child(join))