yakui_widgets/
style.rs

1use yakui_core::geometry::Color;
2
3use crate::font::FontName;
4
5#[derive(Debug, Clone)]
6#[non_exhaustive]
7pub struct TextStyle {
8    pub font: FontName,
9    pub font_size: f32,
10    pub color: Color,
11    pub align: TextAlignment,
12}
13
14impl TextStyle {
15    pub fn label() -> Self {
16        Self {
17            color: Color::WHITE,
18            font: FontName::new("default"),
19            font_size: 14.0,
20            align: TextAlignment::Start,
21        }
22    }
23}
24
25#[derive(Debug, Clone, Copy, PartialEq, Eq)]
26pub enum TextAlignment {
27    Start,
28    Center,
29    End,
30}