From 43baa5d8b87399a02cc7f6f413c101d810a7d472 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 15 Oct 2025 19:50:57 -0300 Subject: [PATCH] title bar: Remove chevron to the side of the avatar when logged in (#40287) Having the chevron to the side of the avatar is arguably unnecessary at this point; most apps out there (Reddit, YouTube, etc.), including here on GitHub, have the avatar without any icon, pointing to how there doesn't seem to be a problem with knowing that there's a menu behind it. Therefore, figured we could simplify the UI a bit more here. This also looks better on platforms where the window controls are on the right (Linux/Windows). Release Notes: - N/A --- crates/title_bar/src/title_bar.rs | 35 ++++++++++++++----------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index be3ee9c4415465de74e42aec0c889ea3e6931d85..f38fd7ed59ec56a3faaad3b6c07f9e56d1defaff 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -189,10 +189,18 @@ impl Render for TitleBar { let status = &*status.borrow(); let user = self.user_store.read(cx).current_user(); + let signed_in = user.is_some(); + children.push( h_flex() + .map(|this| { + if signed_in { + this.pr_1p5() + } else { + this.pr_1() + } + }) .gap_1() - .pr_1() .on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation()) .children(self.render_call_controls(window, cx)) .children(self.render_connection_status(status, cx)) @@ -755,24 +763,13 @@ impl TitleBar { .map(|this| { if is_signed_in { this.trigger_with_tooltip( - ButtonLike::new("user-menu") - .child( - h_flex() - .gap_0p5() - .children( - TitleBarSettings::get_global(cx) - .show_user_picture - .then(|| user_avatar.clone()) - .flatten() - .map(|avatar| Avatar::new(avatar)), - ) - .child( - Icon::new(IconName::ChevronDown) - .size(IconSize::Small) - .color(Color::Muted), - ), - ) - .style(ButtonStyle::Subtle), + ButtonLike::new("user-menu").children( + TitleBarSettings::get_global(cx) + .show_user_picture + .then(|| user_avatar.clone()) + .flatten() + .map(|avatar| Avatar::new(avatar)), + ), Tooltip::text("Toggle User Menu"), ) } else {