diff --git a/tui/src/tui_content/tui_phat.rs b/tui/src/tui_content/tui_phat.rs index 73f4ec1..01a852f 100644 --- a/tui/src/tui_content/tui_phat.rs +++ b/tui/src/tui_content/tui_phat.rs @@ -9,13 +9,15 @@ pub struct Phat { pub colors: [Color;4], } impl Phat { + pub const LO: &'static str = "▄"; + pub const HI: &'static str = "▀"; /// A phat line pub fn lo (fg: Color, bg: Color) -> impl Content { - Fixed::y(1, Tui::fg_bg(fg, bg, RepeatH(&"▄"))) + Fixed::y(1, Tui::fg_bg(fg, bg, RepeatH(Self::LO))) } /// A phat line pub fn hi (fg: Color, bg: Color) -> impl Content { - Fixed::y(1, Tui::fg_bg(fg, bg, RepeatH(&"▀"))) + Fixed::y(1, Tui::fg_bg(fg, bg, RepeatH(Self::HI))) } } impl> Content for Phat { @@ -24,6 +26,10 @@ impl> Content for Phat { let top = Fixed::y(1, Self::lo(bg, hi)); let low = Fixed::y(1, Self::hi(bg, lo)); let content = Tui::fg_bg(fg, bg, &self.content); - Min::xy(self.width, self.height, Bsp::s(top, Bsp::n(low, Fill::xy(content)))) + Min::xy( + self.width, + self.height, + Bsp::s(top, Bsp::n(low, Fill::xy(content))) + ) } }