freya_core/style/vertical_align.rs
1/// Vertical alignment for Paragraph text rendering.
2#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)]
4pub enum VerticalAlign {
5 /// Text is aligned to the top of the paragraph area.
6 #[default]
7 Start,
8 /// Text is vertically centered within the paragraph area.
9 Center,
10}
11
12impl VerticalAlign {
13 pub fn pretty(&self) -> String {
14 match self {
15 Self::Start => "start".to_string(),
16 Self::Center => "center".to_string(),
17 }
18 }
19}