start implementing edn loader; remove PhantomData from some tek_layout constructs

This commit is contained in:
🪞👃🪞 2025-01-03 22:50:58 +01:00
parent f359768ba2
commit 2b07e7963e
20 changed files with 239 additions and 222 deletions

View file

@ -74,11 +74,11 @@ render!(Tui: (self: TransportView<'a>) => Outer(
pub struct PlayPause { pub compact: bool, pub playing: bool }
render!(Tui: (self: PlayPause) => Tui::bg(
if self.playing{Color::Rgb(0,128,0)}else{Color::Rgb(128,64,0)},
Tui::either(self.compact,
Thunk::new(||Fixed::x(9, Tui::either(self.playing,
Either(self.compact,
Thunk::new(||Fixed::x(9, Either(self.playing,
Tui::fg(Color::Rgb(0, 255, 0), " PLAYING "),
Tui::fg(Color::Rgb(255, 128, 0), " STOPPED ")))),
Thunk::new(||Fixed::x(5, Tui::either(self.playing,
Thunk::new(||Fixed::x(5, Either(self.playing,
Tui::fg(Color::Rgb(0, 255, 0), Bsp::s(" 🭍🭑🬽 ", " 🭞🭜🭘 ",)),
Tui::fg(Color::Rgb(255, 128, 0), Bsp::s(" ▗▄▖ ", " ▝▀▘ ",))))))));
@ -95,7 +95,7 @@ impl BeatStats {
Self { compact, bpm: format!("{:.3}", clock.timebase.bpm.get()), beat, time }
}
}
render!(Tui: (self: BeatStats) => Tui::either(self.compact,
render!(Tui: (self: BeatStats) => Either(self.compact,
row!(
FieldV(TuiTheme::g(128).into(), "BPM", &self.bpm),
FieldV(TuiTheme::g(128).into(), "Beat", &self.beat),
@ -124,7 +124,7 @@ impl OutputStats {
}
}
}
render!(Tui: (self: OutputStats) => Tui::either(self.compact,
render!(Tui: (self: OutputStats) => Either(self.compact,
row!(
FieldV(TuiTheme::g(128).into(), "SR", &self.sample_rate),
FieldV(TuiTheme::g(128).into(), "Buf", &self.buffer_size),