Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Update collab panel empty state to match project panel

Nate Butler925e09e01296
diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs
index f113f12f9db..4f0a61bf6a3 100644
--- a/crates/collab_ui/src/collab_panel.rs
+++ b/crates/collab_ui/src/collab_panel.rs
@@ -2299,6 +2299,8 @@ impl View for CollabPanel {
MouseEventHandler::new::<LogInButton, _>(0, cx, |state, _| {
let button = theme.log_in_button.style_for(state);
Label::new("Sign in to collaborate", button.text.clone())
+ .aligned()
+ .left()
.contained()
.with_style(button.container)
})
diff --git a/styles/src/style_tree/collab_panel.ts b/styles/src/style_tree/collab_panel.ts
index 61c96ad75a1..2d8c0508381 100644
--- a/styles/src/style_tree/collab_panel.ts
+++ b/styles/src/style_tree/collab_panel.ts
@@ -153,7 +153,37 @@ export default function contacts_panel(): any {
return {
...collab_modals(),
- log_in_button: text_button(),
+ log_in_button: interactive({
+ base: {
+ background: background(theme.middle),
+ border: border(theme.middle, "active"),
+ corner_radius: 4,
+ margin: {
+ top: 4,
+ left: 16,
+ right: 16,
+ },
+ padding: {
+ top: 3,
+ bottom: 3,
+ left: 7,
+ right: 7,
+ },
+ ...text(theme.middle, "sans", "default", { size: "sm" }),
+ },
+ state: {
+ hovered: {
+ ...text(theme.middle, "sans", "default", { size: "sm" }),
+ background: background(theme.middle, "hovered"),
+ border: border(theme.middle, "active"),
+ },
+ clicked: {
+ ...text(theme.middle, "sans", "default", { size: "sm" }),
+ background: background(theme.middle, "pressed"),
+ border: border(theme.middle, "active"),
+ },
+ },
+ }),
background: background(layer),
padding: {
top: SPACING,