wip: distribute layout operator parsing

This commit is contained in:
🪞👃🪞 2025-01-13 23:21:56 +01:00
parent 4af6e011b6
commit fa70a42bad
12 changed files with 150 additions and 81 deletions

View file

@ -112,7 +112,7 @@ pub fn phat_sel_3 <T: Content<TuiOut>> (
selected: bool, field_1: T, field_2: T, top: Option<Color>, middle: Color, bottom: Color
) -> impl Content<TuiOut> {
let border = Style::default().fg(Color::Rgb(255,255,255)).bg(middle);
Either(selected,
Either::new(selected,
Tui::bg(middle, Outer(border).enclose(Align::w(Bsp::s("", Bsp::n("", Fill::y(field_1)))))),
Bsp::s(Fixed::y(1, top.map(|top|phat_lo(middle, top))),
Bsp::n(Fixed::y(1, phat_hi(middle, bottom)),