Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix a Wayland-related graphic bug for the status bar (#46466)
Paul Di Pietro70d07f9088bd
diff --git a/crates/workspace/src/status_bar.rs b/crates/workspace/src/status_bar.rsindex fcd64e6e7ab..e5a9d5ce0f4 100644--- a/crates/workspace/src/status_bar.rs+++ b/crates/workspace/src/status_bar.rs@@ -92,6 +92,17 @@ impl Render for StatusBar {)// This border is to avoid a transparent gap in the rounded corners.mb(px(-1.))+ .mt({+ #[cfg(target_os = "linux")]+ let needs_gap_fix = {+ // Running on Wayland and using some scaling levels other than 100% causes a+ // 1px gap above the status bar; adding a margin avoids this.+ gpui::guess_compositor() == "Wayland" && window.scale_factor() != 1.0+ };+ #[cfg(not(target_os = "linux"))]+ let needs_gap_fix = false;+ if needs_gap_fix { px(-1.) } else { px(0.) }+ }).border_b(px(1.0)).border_color(cx.theme().colors().status_bar_background),})