Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Compiling
Nathan Sobo19ccb19c9673
diff --git a/crates/gpui/playground/src/element.rs b/crates/gpui/playground/src/element.rsindex 6567a692522..ff1e6412b82 100644--- a/crates/gpui/playground/src/element.rs+++ b/crates/gpui/playground/src/element.rs@@ -524,6 +524,21 @@ impl<V: 'static> AnyElement<V> {from_element: element_layout.as_mut(),};+ let fill_color = self+ .element+ .style_mut()+ .fill+ .as_ref()+ .and_then(Fill::color)+ .map(Into::into);++ cx.scene.push_quad(gpui::scene::Quad {+ bounds: layout.from_engine.bounds,+ background: fill_color,+ border: Default::default(),+ corner_radii: Default::default(),+ });+for event_handler in self.element.handlers_mut().iter().cloned() {let EngineLayout { order, bounds } = layout.from_engine;diff --git a/crates/gpui/playground/src/frame.rs b/crates/gpui/playground/src/frame.rsindex 7bd5546f3dc..56201c331b5 100644--- a/crates/gpui/playground/src/frame.rs+++ b/crates/gpui/playground/src/frame.rs@@ -2,7 +2,7 @@ use crate::{element::{AnyElement, Element, EventHandler, IntoElement, Layout, LayoutContext, NodeId, PaintContext,},- style::{ElementStyle, Fill},+ style::ElementStyle,};use anyhow::{anyhow, Result};use gpui::LayoutNodeId;@@ -56,18 +56,6 @@ impl<V: 'static> Element<V> for Frame<V> {}fn paint(&mut self, layout: Layout<()>, view: &mut V, cx: &mut PaintContext<V>) -> Result<()> {- cx.scene.push_quad(gpui::scene::Quad {- bounds: layout.from_engine.bounds,- background: self- .style- .fill- .as_ref()- .and_then(Fill::color)- .map(Into::into),- border: Default::default(),- corner_radii: Default::default(),- });-for child in &mut self.children {child.paint(view, cx)?;}