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.

Avoid painting a background quad if it is fully transparent

Antonio Scandurra01ce20449178
diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs
index de54da79b3d..c281818c0f0 100644
--- a/crates/gpui2/src/style.rs
+++ b/crates/gpui2/src/style.rs
@@ -384,7 +384,7 @@ impl Style {
});
let background_color = self.background.as_ref().and_then(Fill::color);
- if background_color.is_some() {
+ if background_color.map_or(false, |color| !color.is_transparent()) {
cx.with_z_index(1, |cx| {
cx.paint_quad(quad(
bounds,