fix setting colors

This commit is contained in:
🪞👃🪞 2025-01-27 22:48:30 +01:00
parent a16e5361d1
commit 0999c42f12
10 changed files with 93 additions and 48 deletions

View file

@ -46,6 +46,32 @@ impl Tek {
)))
)
}
pub(crate) fn view_status (&self) -> impl Content<TuiOut> + use<'_> {
self.update_clock();
let theme = ItemPalette::G[96];
let fmtd = self.fmtd.read().unwrap();
Tui::bg(Black, row!(Bsp::a(
Fill::xy(Align::w(self.view_play_pause())),
Fill::xy(Align::e(row!(
FieldH(theme, "BPM", fmtd.bpm.view.clone()),
FieldH(theme, "Beat", fmtd.beat.view.clone()),
FieldH(theme, "Time", fmtd.time.view.clone())
)))
)))
}
pub(crate) fn view_transport (&self) -> impl Content<TuiOut> + use<'_> {
self.update_clock();
let theme = ItemPalette::G[96];
let fmtd = self.fmtd.read().unwrap();
Tui::bg(Black, row!(Bsp::a(
Fill::xy(Align::w(FieldH(theme, "Sel", self.selected.describe(&self.tracks, &self.scenes)))),
Fill::xy(Align::e(row!(
FieldH(theme, "SR", fmtd.sr.view.clone()),
FieldH(theme, "Buf", fmtd.buf.view.clone()),
FieldH(theme, "Lat", fmtd.lat.view.clone()),
)))
)))
}
fn view_play_pause (&self) -> impl Content<TuiOut> + use<'_> {
let playing = self.clock.is_rolling();
let compact = true;//self.is_editing();