mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 20:29:05 +00:00
Add caret next to user avatar
This commit is contained in:
parent
bdccdaca1c
commit
bee6c59154
1 changed files with 17 additions and 10 deletions
|
@ -510,19 +510,26 @@ impl CollabTitlebarItem {
|
||||||
MouseEventHandler::<ToggleUserMenu, Self>::new(0, cx, |state, _| {
|
MouseEventHandler::<ToggleUserMenu, Self>::new(0, cx, |state, _| {
|
||||||
let style = titlebar.call_control.style_for(state);
|
let style = titlebar.call_control.style_for(state);
|
||||||
|
|
||||||
let img = if let Some(avatar_img) = avatar {
|
let mut dropdown = Flex::row().align_children_center();
|
||||||
Self::render_face(avatar_img, *avatar_style, Color::transparent_black())
|
|
||||||
} else {
|
|
||||||
Svg::new("icons/ellipsis_14.svg")
|
|
||||||
.with_color(style.color)
|
|
||||||
.into_any()
|
|
||||||
};
|
|
||||||
|
|
||||||
img.constrained()
|
if let Some(avatar_img) = avatar {
|
||||||
.with_width(style.icon_width)
|
dropdown = dropdown.with_child(Self::render_face(
|
||||||
|
avatar_img,
|
||||||
|
*avatar_style,
|
||||||
|
Color::transparent_black(),
|
||||||
|
));
|
||||||
|
};
|
||||||
|
dropdown
|
||||||
|
.with_child(
|
||||||
|
Svg::new("icons/caret_down_8.svg")
|
||||||
|
.with_color(style.color)
|
||||||
|
.constrained()
|
||||||
|
.with_width(style.icon_width)
|
||||||
|
.contained()
|
||||||
|
.into_any(),
|
||||||
|
)
|
||||||
.aligned()
|
.aligned()
|
||||||
.constrained()
|
.constrained()
|
||||||
.with_width(style.button_width)
|
|
||||||
.with_height(style.button_width)
|
.with_height(style.button_width)
|
||||||
.contained()
|
.contained()
|
||||||
.with_style(style.container)
|
.with_style(style.container)
|
||||||
|
|
Loading…
Reference in a new issue