background

This commit is contained in:
2025-07-30 00:15:40 +02:00
parent 5d1361621d
commit ae16c9a69e
6 changed files with 94 additions and 34 deletions
+22
View File
@@ -22,6 +22,14 @@ pub enum Dimension {
Const(u16),
}
#[derive(Debug, Clone)]
pub enum Background {
NoBackground,
Outline(u32),
RoundedOutline(u32),
Solid(u32),
}
component!(Transform {
pub x: Position,
pub y: Position,
@@ -31,6 +39,20 @@ component!(Transform {
pub height: Dimension,
});
component!(Style {
pub background: Background,
pub foreground: Option<u32>,
});
impl Style {
pub fn new() -> Self {
Self {
background: Background::NoBackground,
foreground: None,
}
}
}
impl Transform {
pub fn new() -> Transform {
Transform {