title_bar: Add show_user_picture setting to let users hide their profile picture (#21526)
Fixes #21464 Closes #21464 Release Notes: - Added `show_user_picture` setting (default: true) to allow users to hide their profile picture in titlebar.
This commit is contained in:
parent
5948ea217b
commit
706372fe4e
4 changed files with 14 additions and 1 deletions
|
@ -37,6 +37,7 @@ project.workspace = true
|
|||
remote.workspace = true
|
||||
rpc.workspace = true
|
||||
serde.workspace = true
|
||||
settings.workspace = true
|
||||
smallvec.workspace = true
|
||||
story = { workspace = true, optional = true }
|
||||
theme.workspace = true
|
||||
|
|
|
@ -19,6 +19,7 @@ use gpui::{
|
|||
};
|
||||
use project::{Project, RepositoryEntry};
|
||||
use rpc::proto;
|
||||
use settings::Settings as _;
|
||||
use smallvec::SmallVec;
|
||||
use std::sync::Arc;
|
||||
use theme::ActiveTheme;
|
||||
|
@ -600,7 +601,11 @@ impl TitleBar {
|
|||
.child(
|
||||
h_flex()
|
||||
.gap_0p5()
|
||||
.child(Avatar::new(user.avatar_uri.clone()))
|
||||
.children(
|
||||
workspace::WorkspaceSettings::get_global(cx)
|
||||
.show_user_picture
|
||||
.then(|| Avatar::new(user.avatar_uri.clone())),
|
||||
)
|
||||
.child(
|
||||
Icon::new(IconName::ChevronDown)
|
||||
.size(IconSize::Small)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue