Rename Box primitive to Quad

This commit is contained in:
Héctor Ramón Jiménez 2019-10-07 02:17:40 +02:00
parent 5286ef36b6
commit 70c17b053b
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ pub enum Primitive {
bounds: Rectangle, bounds: Rectangle,
size: f32, size: f32,
}, },
Box { Quad {
bounds: Rectangle, bounds: Rectangle,
background: Background, background: Background,
}, },

View file

@ -144,8 +144,8 @@ impl Renderer {
scale: wgpu_glyph::Scale { x: *size, y: *size }, scale: wgpu_glyph::Scale { x: *size, y: *size },
..Default::default() ..Default::default()
}), }),
Primitive::Box { bounds, background } => { Primitive::Quad { bounds, background } => {
// TODO: Batch boxes and draw them all at once // TODO: Batch quads and draw them all at once
} }
} }
} }

View file

@ -20,7 +20,7 @@ impl button::Renderer for Renderer {
) -> Self::Primitive { ) -> Self::Primitive {
Primitive::Group { Primitive::Group {
primitives: vec![ primitives: vec![
Primitive::Box { Primitive::Quad {
bounds: layout.bounds(), bounds: layout.bounds(),
background: Background::Color(Color { background: Background::Color(Color {
r: 0.0, r: 0.0,