update layout macro invocations

This commit is contained in:
🪞👃🪞 2024-12-31 04:37:45 +01:00
parent e677d1d7d4
commit 83eb9dd2fa
19 changed files with 153 additions and 169 deletions

View file

@ -20,7 +20,8 @@ impl<'a> ArrangerVClips<'a> {
impl<'a, E: Engine> Content<E> for ArrangerVClips<'a> {
fn content (&self) -> Option<impl Content<E>> {
let iter = self.scenes.iter().zip(self.rows.iter().map(|row|row.0));
let col = col_iter!(iter => |(scene, pulses)|Self::format_scene(self.tracks, scene, pulses));
let col = Coll::map(self.scenes.iter().zip(self.rows.iter().map(|row|row.0)), |(scene, pulses), i|
Self::format_scene(self.tracks, scene, pulses));
Some(Fill::xy(col))
}
}
@ -36,9 +37,8 @@ impl<'a> ArrangerVClips<'a> {
if playing { "" } else { " " }),
Tui::fg_bg(scene.color.lightest.rgb, scene.color.base.rgb,
Expand::x(1, Tui::bold(true, scene.name.read().unwrap().as_str()))),
row_iter!((index, track, x1, x2) in ArrangerTrack::with_widths(tracks) => {
Self::format_clip(scene, index, track, (x2 - x1) as u16, height)
})))}
Coll::map(ArrangerTrack::with_widths(tracks), |(index, track, x1, x2), _|
Push::x(Self::format_clip(scene, index, track, (x2 - x1) as u16, height)))))}
fn format_clip (
scene: &'a ArrangerScene, index: usize, track: &'a ArrangerTrack, w: u16, h: u16