title_bar: Render chevron if show_user_picture is disabled (#40474)

Closes https://github.com/zed-industries/zed/issues/40460

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth 2025-10-17 13:03:29 +02:00 committed by GitHub
parent 568bb02759
commit dd32bb6c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -761,15 +761,10 @@ impl TitleBar {
.into()
})
.map(|this| {
if is_signed_in {
if is_signed_in && TitleBarSettings::get_global(cx).show_user_picture {
this.trigger_with_tooltip(
ButtonLike::new("user-menu").children(
TitleBarSettings::get_global(cx)
.show_user_picture
.then(|| user_avatar.clone())
.flatten()
.map(|avatar| Avatar::new(avatar)),
),
ButtonLike::new("user-menu")
.children(user_avatar.clone().map(|avatar| Avatar::new(avatar))),
Tooltip::text("Toggle User Menu"),
)
} else {