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.

sidebar: Fix window controls position with no open projects (#62021)

Estevan Teixeira Santos5a5fbe799179
diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs
index 55b6c9309c3..0cfd72880b7 100644
--- a/crates/sidebar/src/sidebar.rs
+++ b/crates/sidebar/src/sidebar.rs
@@ -7475,7 +7475,11 @@ impl Sidebar {
)
})
.when(right_window_controls, |this| {
- this.children(Self::render_right_window_controls(window, cx))
+ this
+ // Without projects, nothing flex-grows to push right-side window controls
+ // to the edge.
+ .when(no_open_projects, |this| this.justify_end())
+ .children(Self::render_right_window_controls(window, cx))
})
}