Get a 50% colored box rendering
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
740b105330
commit
f9858445b8
8 changed files with 130 additions and 49 deletions
|
@ -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)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue