Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix anti-aliasing artifacts in borders
Nathan Sobo21f0409e3bf2
diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rsindex c281818c0f0..7f6af4fd210 100644--- a/crates/gpui2/src/style.rs+++ b/crates/gpui2/src/style.rs@@ -386,12 +386,14 @@ impl Style {let background_color = self.background.as_ref().and_then(Fill::color);if background_color.map_or(false, |color| !color.is_transparent()) {cx.with_z_index(1, |cx| {+ let mut border_color = background_color.unwrap_or_default();+ border_color.a = 0.;cx.paint_quad(quad(bounds,self.corner_radii.to_pixels(bounds.size, rem_size),background_color.unwrap_or_default(),Edges::default(),- Hsla::transparent_black(),+ border_color,));});}@@ -426,10 +428,12 @@ impl Style {bottom_bounds.upper_right(),);+ let mut background = self.border_color.unwrap_or_default();+ background.a = 0.;let quad = quad(bounds,corner_radii,- Hsla::transparent_black(),+ background,border_widths,self.border_color.unwrap_or_default(),);