29 lines
592 B
Rust
29 lines
592 B
Rust
|
use iced::Background;
|
||
|
use iced::Color;
|
||
|
use iced::widget::container;
|
||
|
|
||
|
#[derive(Copy, Clone, Debug)]
|
||
|
pub struct Theme {
|
||
|
pub base_color: Color,
|
||
|
pub text_color: Color,
|
||
|
}
|
||
|
|
||
|
impl Default for Theme {
|
||
|
fn default() -> Self {
|
||
|
Theme {
|
||
|
base_color: Color {r: 236. / 255., g: 63. / 255., b: 53. / 255., a: 1.},
|
||
|
text_color: Color {r: 1., g: 1., b: 1., a: 1.},
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl container::StyleSheet for Theme {
|
||
|
fn style(&self) -> container::Style {
|
||
|
container::Style {
|
||
|
text_color: Some(self.text_color),
|
||
|
background: Some(Background::Color(self.base_color)),
|
||
|
..Default::default()
|
||
|
}
|
||
|
}
|
||
|
}
|