mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 03:36:41 +01:00
This commit is contained in:
parent
7746abc9ee
commit
99d9da6ffd
2 changed files with 25 additions and 18 deletions
|
|
@ -22,12 +22,11 @@
|
||||||
(bsp/a :view-dialog
|
(bsp/a :view-dialog
|
||||||
(bsp/w :view-meters-output
|
(bsp/w :view-meters-output
|
||||||
(bsp/e :view-meters-input
|
(bsp/e :view-meters-input
|
||||||
(bsp/n :view-history
|
(bsp/n (fixed/y 2 :view-status-h2)
|
||||||
(bsp/n (fixed/y 2 :view-status-h2)
|
(bsp/n :view-tracks-inputs
|
||||||
(bsp/n :view-tracks-inputs
|
(bsp/s :view-tracks-devices
|
||||||
(bsp/s :view-tracks-devices
|
(bsp/s :view-tracks-outputs
|
||||||
(bsp/s :view-tracks-outputs
|
(bsp/s :view-tracks-names
|
||||||
(bsp/s :view-tracks-names
|
(fill/xy (either :focus-editor
|
||||||
(fill/xy (either :focus-editor
|
(bsp/e :view-scenes-names :view-editor)
|
||||||
(bsp/e :view-scenes-names :view-editor)
|
:view-scenes)))))))))))
|
||||||
:view-scenes))))))))))))
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ impl App {
|
||||||
"nil"
|
"nil"
|
||||||
}
|
}
|
||||||
pub fn view_history (&self) -> impl Content<TuiOut> {
|
pub fn view_history (&self) -> impl Content<TuiOut> {
|
||||||
Fill::x(Align::w(self.history.last()
|
Fixed::y(1, Fill::x(Align::w(FieldH(self.color,
|
||||||
.map(|last|FieldH(self.color, format!("History ({})", self.history.len()),
|
format!("History ({})", self.history.len()),
|
||||||
Fill::x(Align::w(format!("{:?}", last.0)))))));
|
self.history.last().map(|last|Fill::x(Align::w(format!("{:?}", last.0))))))))
|
||||||
}
|
}
|
||||||
pub fn view_status_h2 (&self) -> impl Content<TuiOut> + use<'_> {
|
pub fn view_status_h2 (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
self.update_clock();
|
self.update_clock();
|
||||||
|
|
@ -32,7 +32,7 @@ impl App {
|
||||||
add(&" ");
|
add(&" ");
|
||||||
{
|
{
|
||||||
let cache = self.view_cache.read().unwrap();
|
let cache = self.view_cache.read().unwrap();
|
||||||
add(&Fixed::x(13, Align::w(Bsp::s(
|
add(&Fixed::x(15, Align::w(Bsp::s(
|
||||||
FieldH(theme, "Beat", cache.beat.view.clone()),
|
FieldH(theme, "Beat", cache.beat.view.clone()),
|
||||||
FieldH(theme, "Time", cache.time.view.clone()),
|
FieldH(theme, "Time", cache.time.view.clone()),
|
||||||
))));
|
))));
|
||||||
|
|
@ -40,14 +40,22 @@ impl App {
|
||||||
Fill::x(Align::w(FieldH(theme, "BPM", cache.bpm.view.clone()))),
|
Fill::x(Align::w(FieldH(theme, "BPM", cache.bpm.view.clone()))),
|
||||||
Fill::x(Align::w(FieldH(theme, "SR ", cache.sr.view.clone()))),
|
Fill::x(Align::w(FieldH(theme, "SR ", cache.sr.view.clone()))),
|
||||||
))));
|
))));
|
||||||
add(&Fixed::x(13, Align::w(Bsp::s(
|
add(&Fixed::x(12, Align::w(Bsp::s(
|
||||||
Fill::x(Align::w(FieldH(theme, "Buf", cache.buf.view.clone()))),
|
Fill::x(Align::w(FieldH(theme, "Buf", cache.buf.view.clone()))),
|
||||||
Fill::x(Align::w(FieldH(theme, "Lat", cache.lat.view.clone()))),
|
Fill::x(Align::w(FieldH(theme, "Lat", cache.lat.view.clone()))),
|
||||||
))));
|
))));
|
||||||
add(&Fixed::x(16, FieldV(theme, "Selection", Align::w(self.selection().describe(
|
add(&Bsp::s(
|
||||||
self.tracks(),
|
Fill::x(Align::w(FieldH(theme, "Selected", Align::w(self.selection().describe(
|
||||||
self.scenes()
|
self.tracks(),
|
||||||
)))));
|
self.scenes()
|
||||||
|
))))),
|
||||||
|
Fill::x(Align::w(FieldH(theme, format!("History ({})", self.history.len()),
|
||||||
|
self.history.last().map(|last|Fill::x(Align::w(format!("{:?}", last.0)))))))
|
||||||
|
));
|
||||||
|
//if let Some(last) = self.history.last() {
|
||||||
|
//add(&FieldV(theme, format!("History ({})", self.history.len()),
|
||||||
|
//Fill::x(Align::w(format!("{:?}", last.0)))));
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue