15 lines
317 B
Rust
15 lines
317 B
Rust
use crate::Color;
|
|
|
|
/// The background of some element.
|
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
|
pub enum Background {
|
|
/// A solid color
|
|
Color(Color),
|
|
// TODO: Add gradient and image variants
|
|
}
|
|
|
|
impl From<Color> for Background {
|
|
fn from(color: Color) -> Self {
|
|
Background::Color(color)
|
|
}
|
|
}
|