forge
Explore
Log in

Don't you dare go Hollow

'Join' next to In voice uses the same filled pill as 'Join voice', at chip height

Browse files at this commit

03cece23c2bbbbc59665d8ee03e16fba93283841Ahmet Kaan GümüşParent: 5ca3aa5
  • style
    • 'Join' next to In voice uses the same filled pill as 'Join voice', at chip height
Show full message
💄 style: 'Join' next to In voice uses the same filled pill as 'Join voice', at chip height
crates/client/src/gui/chat.rsmodified+11 -18
@@ -3228,25 +3228,18 @@ fn members_column(
32283228 let action = entity_action(&entity, move |yumush, window, cx| {
32293229 yumush.toggle_voice(community_id, window, cx)
32303230 });
3231- if in_call.is_empty() {
3232- return super::parts::pill("margin_join", palette.tokens, action)
3233- .self_start()
3234- .gap(px(space::SM))
3235- .text_color(palette.tokens.ground())
3236- .font_weight(FontWeight::SEMIBOLD)
3237- .child(super::parts::small_icon(IconName::Headphones))
3238- .child(w().chat.join_voice);
3239- }
3240- clickable("margin_join", palette, action)
3241- .h(px(size::CHIP))
3242- .px(px(space::XS))
3243- .flex()
3244- .items_center()
3231+ let empty = in_call.is_empty();
3232+ let pill = super::parts::pill("margin_join", palette.tokens, action)
3233+ .self_start()
32453234 .gap(px(space::SM))
3246- .rounded(px(radius::MD))
3247- .text_color(palette.accent)
3248- .child(super::parts::small_icon(IconName::Headphones))
3249- .child(w().chat.join)
3235+ .text_color(palette.tokens.ground())
3236+ .font_weight(FontWeight::SEMIBOLD)
3237+ .child(super::parts::small_icon(IconName::Headphones));
3238+ if empty {
3239+ pill.child(w().chat.join_voice)
3240+ } else {
3241+ pill.h(px(size::CHIP)).px(px(space::SM)).child(w().chat.join)
3242+ }
32503243 });
32513244 let call = if in_call.is_empty() {
32523245 join.map(|join| div().child(join))