mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-04-04 13:20:44 +02:00
ohh why did i begin this refactor. e57
This commit is contained in:
parent
83eb9dd2fa
commit
49adf34b02
6 changed files with 46 additions and 41 deletions
|
|
@ -102,23 +102,25 @@ impl ArrangerTui {
|
|||
render!(Tui: (self: ArrangerTui) => {
|
||||
let play = PlayPause(self.clock.is_rolling());
|
||||
let transport = TransportView::new(self, Some(ItemPalette::from(TuiTheme::g(96))), true);
|
||||
let with_transport = |x|col!(row!(&play, &transport), &x);
|
||||
let pool_size = if self.phrases.visible { self.splits[1] } else { 0 };
|
||||
let with_pool = |x|Split::w(false, pool_size, PoolView(&self.phrases), x);
|
||||
let status = ArrangerStatus::from(self);
|
||||
let with_editbar = |x|Split::n(false, 1, MidiEditStatus(&self.editor), x);
|
||||
let with_status = |x|Split::n(false, 2, status, x);
|
||||
let with_size = |x|lay!(&self.size, x);
|
||||
let arranger = ||lay!(|add|{
|
||||
let arranger = ||{
|
||||
let color = self.color;
|
||||
add(&Fill::xy(Tui::bg(color.darkest.rgb, "")))?;
|
||||
add(&Fill::xy(Outer(Style::default().fg(color.dark.rgb).bg(color.darkest.rgb))))?;
|
||||
add(&Self::render_mode(self))
|
||||
});
|
||||
with_size(with_status(with_editbar(with_pool(with_transport(col!(
|
||||
lay!(
|
||||
Fill::xy(Tui::bg(color.darkest.rgb, "")),
|
||||
Fill::xy(Outer(Style::default().fg(color.dark.rgb).bg(color.darkest.rgb))),
|
||||
Self::render_mode(self),
|
||||
)
|
||||
};
|
||||
with_size(with_status(with_editbar(with_pool(col!(
|
||||
row!(play, transport),
|
||||
Fill::x(Fixed::y(20, arranger())),
|
||||
Fill::xy(&self.editor),
|
||||
))))))
|
||||
)))))
|
||||
});
|
||||
audio!(|self: ArrangerTui, client, scope|{
|
||||
// Start profiling cycle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue