From e0b6b0df2aab8edd5502d7e7bc10df9ca4cbf3be Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 10 Oct 2022 18:12:00 -0600 Subject: [PATCH] Rename Join button to Open, rework message slightly --- crates/collab_ui/src/project_shared_notification.rs | 10 +++++----- crates/theme/src/theme.rs | 2 +- styles/src/styleTree/projectSharedNotification.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/collab_ui/src/project_shared_notification.rs b/crates/collab_ui/src/project_shared_notification.rs index e5ff27060a5f6299795e8679b508a40f2a9e92ca..22383feb20fc3da614654a078b34d2f32e11af9f 100644 --- a/crates/collab_ui/src/project_shared_notification.rs +++ b/crates/collab_ui/src/project_shared_notification.rs @@ -102,7 +102,7 @@ impl ProjectSharedNotification { .with_child( Label::new( format!( - "shared a project in Zed{}", + "is sharing a project in Zed{}", if self.worktree_root_names.is_empty() { "" } else { @@ -140,7 +140,7 @@ impl ProjectSharedNotification { } fn render_buttons(&self, cx: &mut RenderContext) -> ElementBox { - enum Join {} + enum Open {} enum Dismiss {} let project_id = self.project_id; @@ -148,12 +148,12 @@ impl ProjectSharedNotification { Flex::column() .with_child( - MouseEventHandler::::new(0, cx, |_, cx| { + MouseEventHandler::::new(0, cx, |_, cx| { let theme = &cx.global::().theme.project_shared_notification; - Label::new("Join".to_string(), theme.join_button.text.clone()) + Label::new("Open".to_string(), theme.open_button.text.clone()) .aligned() .contained() - .with_style(theme.join_button.container) + .with_style(theme.open_button.container) .boxed() }) .with_cursor_style(CursorStyle::PointingHand) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 50e2462c159997636fe4e0129687355badf3d123..7f11ae6e03633a141a9303e18a5796448d04c528 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -482,7 +482,7 @@ pub struct ProjectSharedNotification { pub message: ContainedText, pub worktree_roots: ContainedText, pub button_width: f32, - pub join_button: ContainedText, + pub open_button: ContainedText, pub dismiss_button: ContainedText, } diff --git a/styles/src/styleTree/projectSharedNotification.ts b/styles/src/styleTree/projectSharedNotification.ts index abe77e7d56ad4ecfbf6734e47d9ef891249cadd8..f6ebf4781afe40ce2a0088524326e0d0d8c005a7 100644 --- a/styles/src/styleTree/projectSharedNotification.ts +++ b/styles/src/styleTree/projectSharedNotification.ts @@ -5,7 +5,7 @@ export default function projectSharedNotification(theme: Theme): Object { const avatarSize = 48; return { windowHeight: 72, - windowWidth: 360, + windowWidth: 380, background: backgroundColor(theme, 300), ownerContainer: { padding: 12, @@ -31,7 +31,7 @@ export default function projectSharedNotification(theme: Theme): Object { margin: { top: -3 }, }, buttonWidth: 96, - joinButton: { + openButton: { background: backgroundColor(theme, "info", "active"), border: { left: true, bottom: true, width: 1, color: borderColor(theme, "primary") }, ...text(theme, "sans", "info", { size: "xs", weight: "extra_bold" })