euphuckingwrecka

This commit is contained in:
🪞👃🪞 2025-05-18 18:54:30 +03:00
parent 3e9545fe26
commit 7746abc9ee
5 changed files with 92 additions and 86 deletions

View file

@ -7,6 +7,11 @@ impl App {
pub fn view_nil (&self) -> impl Content<TuiOut> + use<'_> {
"nil"
}
pub fn view_history (&self) -> impl Content<TuiOut> {
Fill::x(Align::w(self.history.last()
.map(|last|FieldH(self.color, format!("History ({})", self.history.len()),
Fill::x(Align::w(format!("{:?}", last.0)))))));
}
pub fn view_status_h2 (&self) -> impl Content<TuiOut> + use<'_> {
self.update_clock();
let theme = self.color;
@ -24,25 +29,25 @@ impl App {
)
)
)));
add(&" ");
{
let cache = self.view_cache.read().unwrap();
add(&Fixed::x(16, Align::w(Bsp::s(
add(&Fixed::x(13, Align::w(Bsp::s(
FieldH(theme, "Beat", cache.beat.view.clone()),
FieldH(theme, "Time", cache.time.view.clone()),
))));
add(&Fixed::x(16, Align::w(Bsp::s(
add(&Fixed::x(13, Align::w(Bsp::s(
Fill::x(Align::w(FieldH(theme, "BPM", cache.bpm.view.clone()))),
Fill::x(Align::w(FieldH(theme, "SR ", cache.sr.view.clone()))),
))));
add(&Fixed::x(16, Align::w(Bsp::s(
add(&Fixed::x(13, Align::w(Bsp::s(
Fill::x(Align::w(FieldH(theme, "Buf", cache.buf.view.clone()))),
Fill::x(Align::w(FieldH(theme, "Lat", cache.lat.view.clone()))),
))));
add(&FieldV(theme, "Selection", Fill::x(Align::w(self.selection().describe(
add(&Fixed::x(16, FieldV(theme, "Selection", Align::w(self.selection().describe(
self.tracks(),
self.scenes()
)))));
add(&FieldV(theme, "History", Fill::x(Align::w(format!("{}", self.history.len())))));
}
}))
}