Get a 50% colored box rendering

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Nathan Sobo 2023-08-14 14:46:09 -06:00
parent 740b105330
commit f9858445b8
8 changed files with 130 additions and 49 deletions

View file

@ -37,6 +37,13 @@ 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.bounds,
background: self.style.fill.color().map(Into::into),
border: Default::default(),
corner_radii: Default::default(),
});
for child in &mut self.children {
child.paint(view, cx)?;
}