iced/wgpu/src/primitive.rs
Héctor Ramón Jiménez 10e10e5e06 Make iced_core::Button customizable
Now it supports:
  - Any kind of content
  - Custom border radius
  - Custom background
2019-10-08 03:13:41 +02:00

22 lines
494 B
Rust

use iced_native::{text, Background, Color, Rectangle};
#[derive(Debug, Clone)]
pub enum Primitive {
None,
Group {
primitives: Vec<Primitive>,
},
Text {
content: String,
bounds: Rectangle,
color: Color,
size: f32,
horizontal_alignment: text::HorizontalAlignment,
vertical_alignment: text::VerticalAlignment,
},
Quad {
bounds: Rectangle,
background: Background,
border_radius: u16,
},
}