trying to fix the main layout, what happened

This commit is contained in:
🪞👃🪞 2025-03-30 21:20:50 +03:00
parent 0c6484d733
commit 85749a3437
6 changed files with 41 additions and 37 deletions

View file

@ -34,23 +34,23 @@ impl<A, B, C> Content<TuiOut> for Tryptich<A, B, C>
where A: Content<TuiOut>, B: Content<TuiOut>, C: Content<TuiOut> {
fn content (&self) -> impl Render<TuiOut> {
let Self { top, h, left: (w_a, ref a), middle: (w_b, ref b), right: (w_c, ref c) } = *self;
if top {
Fixed::y(h, Bsp::a(
Fixed::y(h, if top {
Bsp::a(
Fill::x(Align::n(Fixed::x(w_b, Align::x(Tui::bg(Reset, b))))),
Bsp::a(
Fill::x(Align::nw(Fixed::x(w_a, Tui::bg(Reset, a)))),
Fill::x(Align::ne(Fixed::x(w_c, Tui::bg(Reset, c)))),
),
))
)
} else {
Fixed::y(h, Bsp::a(
Bsp::a(
Fill::xy(Align::c(Fixed::x(w_b, Align::x(Tui::bg(Reset, b))))),
Bsp::a(
Fill::xy(Align::w(Fixed::x(w_a, Tui::bg(Reset, a)))),
Fill::xy(Align::e(Fixed::x(w_c, Tui::bg(Reset, c)))),
),
))
}
)
})
}
}