Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Lukas Wirthdd32bb6c7483
diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs
index f38fd7ed59e..ec98e0d2d9c 100644
--- a/crates/title_bar/src/title_bar.rs
+++ b/crates/title_bar/src/title_bar.rs
@@ -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 {