1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::prelude::Length;

#[derive(PartialEq, Clone, Debug)]
pub enum VisibleSize {
    Full,
    InnerPercentage(Length),
}

impl Default for VisibleSize {
    fn default() -> Self {
        Self::Full
    }
}

impl VisibleSize {
    pub fn pretty(&self) -> String {
        match self {
            Self::Full => "full".to_string(),
            Self::InnerPercentage(p) => format!("{}%", p.get()),
        }
    }
}