From 1a277e97c1151bb6fd74b496774357d2acc09f0d Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 23 Mar 2023 13:16:40 -0700 Subject: [PATCH] Merge pull request #2317 from zed-industries/fix-titlebar-right-spacing Fix misaligned UI in the right titlebar --- crates/collab_ui/src/collab_titlebar_item.rs | 3 ++- styles/src/styleTree/workspace.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index fbaf72b332..3228f7d5a6 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -89,7 +89,7 @@ impl View for CollabTitlebarItem { let theme = cx.global::().theme.clone(); let mut left_container = Flex::row(); - let mut right_container = Flex::row(); + let mut right_container = Flex::row().align_children_center(); left_container.add_child( Label::new(project_title, theme.workspace.titlebar.title.clone()) @@ -117,6 +117,7 @@ impl View for CollabTitlebarItem { let status = workspace.read(cx).client().status(); let status = &*status.borrow(); + if matches!(status, client::Status::Connected { .. }) { right_container.add_child(self.render_toggle_contacts_button(&theme, cx)); right_container.add_child(self.render_user_menu_button(&theme, cx)); diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index e3c24a0a6a..6edbfe7c55 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -174,6 +174,9 @@ export default function workspace(colorScheme: ColorScheme) { // Sign in buttom // FlatButton, Variant signInPrompt: { + margin: { + left: itemSpacing + }, ...titlebarButton, },