mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-01-12 02:56:42 +01:00
down to 15e
This commit is contained in:
parent
16e6a0397c
commit
1de163d0d3
7 changed files with 67 additions and 65 deletions
|
|
@ -16,25 +16,24 @@ from!(<'a>|state: &'a ArrangerTui|ArrangerVHead<'a> = Self { // A
|
|||
});
|
||||
|
||||
render!(Tui: (self: ArrangerVHead<'a>) => {
|
||||
|
||||
fn row <T: Content<Tui>> (color: ItemPalette, field: &T) -> impl Content<Tui> + use<'_, T> {
|
||||
fn row <T: Content<Tui>> (color: ItemPalette, field: T) -> impl Content<Tui> {
|
||||
row!(Tui::fg(color.light.rgb, "▎"), Tui::fg(color.lightest.rgb, field))
|
||||
}
|
||||
|
||||
Some(Push::x(self.scenes_w,
|
||||
Coll::map(ArrangerTrack::with_widths(self.tracks), |(_, track, x1, x2), i| {
|
||||
let (w, h) = (ArrangerTrack::MIN_WIDTH.max(x2 - x1), HEADER_H);
|
||||
let color = track.color();
|
||||
let color = track.color();
|
||||
let input = Self::format_input(track);
|
||||
let output = Self::format_output(track);
|
||||
Tui::bg(color.base.rgb, Min::xy(w as u16, h, Fixed::xy(w as u16, 5, col!(
|
||||
row(color, &Self::format_name(track, w)),
|
||||
row(color, &Self::format_input(track)?),
|
||||
row(color, &Self::format_output(track)?),
|
||||
row(color, &Self::format_elapsed(track, self.timebase)),
|
||||
row(color, &Self::format_until_next(track, self.current)),
|
||||
row(color, Self::format_name(track, w)),
|
||||
row(color, Self::format_input(track).ok()),
|
||||
row(color, Self::format_output(track).ok()),
|
||||
row(color, Self::format_elapsed(track, self.timebase)),
|
||||
row(color, Self::format_until_next(track, self.current)),
|
||||
))))
|
||||
})
|
||||
))
|
||||
|
||||
});
|
||||
|
||||
impl ArrangerVHead<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue