mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: tryptich layout
This commit is contained in:
parent
438a2d86a6
commit
30f2cba54d
4 changed files with 246 additions and 282 deletions
|
|
@ -36,38 +36,6 @@ provide_num!(u16: |self: Tek| {
|
|||
":y-outs" => (self.size.h() as u16).saturating_sub(self.h_outputs() + 1),
|
||||
":y-samples" => if self.is_editing() { 1 } else { 0 },
|
||||
});
|
||||
pub(crate) fn row <'a> (
|
||||
w: u16,
|
||||
h: u16,
|
||||
s: u16,
|
||||
a: impl Content<TuiOut> + 'a,
|
||||
b: impl Content<TuiOut> + 'a,
|
||||
c: impl Content<TuiOut> + 'a,
|
||||
) -> impl Content<TuiOut> + 'a {
|
||||
Fixed::y(h, Bsp::a(
|
||||
Fill::xy(Align::c(Fixed::x(w, Align::x(b)))),
|
||||
Bsp::a(
|
||||
Fill::xy(Align::w(Fixed::x(s, a))),
|
||||
Fill::xy(Align::e(Fixed::x(s, c))),
|
||||
),
|
||||
))
|
||||
}
|
||||
pub(crate) fn row_top <'a> (
|
||||
w: u16,
|
||||
h: u16,
|
||||
s: u16,
|
||||
a: impl Content<TuiOut> + 'a,
|
||||
b: impl Content<TuiOut> + 'a,
|
||||
c: impl Content<TuiOut> + 'a,
|
||||
) -> impl Content<TuiOut> + 'a {
|
||||
Fixed::y(h, Bsp::a(
|
||||
Fill::x(Align::n(Fixed::x(w, Align::x(Tui::bg(Reset, b))))),
|
||||
Bsp::a(
|
||||
Fill::x(Align::nw(Fixed::x(s, Tui::bg(Reset, a)))),
|
||||
Fill::x(Align::ne(Fixed::x(s, Tui::bg(Reset, c)))),
|
||||
),
|
||||
))
|
||||
}
|
||||
pub(crate) fn wrap (
|
||||
bg: Color,
|
||||
fg: Color,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue