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.

Remove red borders, improve left side padding

Nate Butler47eaf1abd888
diff --git a/crates/collab_ui2/src/collab_titlebar_item.rs b/crates/collab_ui2/src/collab_titlebar_item.rs
index b127708fa69..7ce3502c7db 100644
--- a/crates/collab_ui2/src/collab_titlebar_item.rs
+++ b/crates/collab_ui2/src/collab_titlebar_item.rs
@@ -74,12 +74,16 @@ impl Render for CollabTitlebarItem {
// Set a non-scaling min-height here to ensure the titlebar is
// always at least the height of the traffic lights.
.min_h(px(32.))
- .when(
- !matches!(cx.window_bounds(), WindowBounds::Fullscreen),
- // Use pixels here instead of a rem-based size because the macOS traffic
- // lights are a static size, and don't scale with the rest of the UI.
- |s| s.pl(px(68.)),
- )
+ .pl_2()
+ .map(|this| {
+ if matches!(cx.window_bounds(), WindowBounds::Fullscreen) {
+ this.pl_2()
+ } else {
+ // Use pixels here instead of a rem-based size because the macOS traffic
+ // lights are a static size, and don't scale with the rest of the UI.
+ this.pl(px(72.))
+ }
+ })
.bg(cx.theme().colors().title_bar_background)
.on_click(|event, cx| {
if event.up.click_count == 2 {
@@ -325,8 +329,6 @@ impl CollabTitlebarItem {
let name = util::truncate_and_trailoff(name, MAX_PROJECT_NAME_LENGTH);
div()
- .border()
- .border_color(gpui::red())
.child(
Button::new("project_name_trigger", name)
.style(ButtonStyle::Subtle)
@@ -365,10 +367,9 @@ impl CollabTitlebarItem {
Some(
div()
- .border()
- .border_color(gpui::red())
.child(
Button::new("project_branch_trigger", branch_name)
+ .color(Color::Muted)
.style(ButtonStyle::Subtle)
.tooltip(move |cx| {
Tooltip::with_meta(