separate tui model and view layers

This commit is contained in:
🪞👃🪞 2024-11-25 17:57:20 +01:00
parent 1060afa4f3
commit 416acd9f7b
19 changed files with 1124 additions and 1095 deletions

View file

@ -0,0 +1,20 @@
use crate::*;
impl Content for SequencerTui {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
lay!(
col!(
TransportView::from(self),
Split::right(20,
widget(&PhrasesView(self)),
widget(&PhraseView(self)),
).min_y(20)
),
self.perf.percentage()
.map(|cpu|format!("{cpu:.03}%"))
.fg(Color::Rgb(255,128,0))
.align_sw(),
)
}
}