Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Position contacts and user menus
Petros Amoiridis86ed5b8b83e1
diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rsindex 59a4f36e273..30e9ed13fd0 100644--- a/crates/collab_ui/src/collab_titlebar_item.rs+++ b/crates/collab_ui/src/collab_titlebar_item.rs@@ -322,20 +322,7 @@ impl CollabTitlebarItem {]};- user_menu.show(- vec2f(- theme- .workspace- .titlebar- .user_menu_button- .default- .button_width,- theme.workspace.titlebar.height,- ),- AnchorCorner::TopRight,- items,- cx,- );+ user_menu.show(Default::default(), AnchorCorner::TopRight, items, cx);});}@@ -402,7 +389,6 @@ impl CollabTitlebarItem {theme.tooltip.clone(),cx,)- .aligned().boxed(),).with_children(badge)@@ -547,10 +533,15 @@ impl CollabTitlebarItem {).contained().with_margin_left(theme.workspace.titlebar.item_spacing)- .aligned().boxed(),)- .with_child(ChildView::new(&self.user_menu, cx).boxed())+ .with_child(+ ChildView::new(&self.user_menu, cx)+ .aligned()+ .bottom()+ .right()+ .boxed(),+ ).boxed()}@@ -572,22 +563,18 @@ impl CollabTitlebarItem {fn render_contacts_popover_host<'a>(&'a self,- theme: &'a theme::Titlebar,+ _theme: &'a theme::Titlebar,cx: &'a RenderContext<Self>,) -> Option<ElementBox> {self.contacts_popover.as_ref().map(|popover| {- Overlay::new(- ChildView::new(popover, cx)- .contained()- .with_margin_top(theme.height)- .with_margin_left(theme.toggle_contacts_button.default.button_width)- .with_margin_right(-theme.toggle_contacts_button.default.button_width)- .boxed(),- )- .with_fit_mode(OverlayFitMode::SwitchAnchor)- .with_anchor_corner(AnchorCorner::BottomLeft)- .with_z_index(999)- .boxed()+ Overlay::new(ChildView::new(popover, cx).boxed())+ .with_fit_mode(OverlayFitMode::SwitchAnchor)+ .with_anchor_corner(AnchorCorner::TopRight)+ .with_z_index(999)+ .aligned()+ .bottom()+ .right()+ .boxed()})}diff --git a/styles/src/styleTree/contactsPopover.ts b/styles/src/styleTree/contactsPopover.tsindex 0819421daa6..5e865aff177 100644--- a/styles/src/styleTree/contactsPopover.ts+++ b/styles/src/styleTree/contactsPopover.ts@@ -8,7 +8,6 @@ export default function contactsPopover(colorScheme: ColorScheme) {background: background(layer),cornerRadius: 6,padding: { top: 6, bottom: 6 },- margin: { top: -6 },shadow: colorScheme.popoverShadow,border: border(layer),width: 300,