update layout macro invocations

This commit is contained in:
🪞👃🪞 2024-12-31 04:37:45 +01:00
parent e677d1d7d4
commit 83eb9dd2fa
19 changed files with 153 additions and 169 deletions

View file

@ -49,28 +49,28 @@ render!(Tui: (self: SequencerTui) => {
let status = SequencerStatus::from(self);
let with_status = |x|Split::n(false, if self.status { 2 } else { 0 }, status, x);
let with_editbar = |x|Split::n(false, 1, MidiEditStatus(&self.editor), x);
let with_size = |x|lay!([self.size, x]);
let with_size = |x|lay!(self.size, x);
let editor = with_editbar(with_pool(Fill::xy(&self.editor)));
let color = self.player.play_phrase().as_ref().map(|(_,p)|
p.as_ref().map(|p|p.read().unwrap().color)
).flatten().clone();
let toolbar = Cond::when(self.transport, row!([
let toolbar = Cond::when(self.transport, row!(
PlayPause(self.clock.is_rolling()),
TransportView::new(self, color, true),
]));
));
let play_queue = Cond::when(self.selectors, row!([
let play_queue = Cond::when(self.selectors, row!(
PhraseSelector::play_phrase(&self.player),
PhraseSelector::next_phrase(&self.player),
]));
));
Min::y(15, with_size(with_status(col!([
Min::y(15, with_size(with_status(col!(
toolbar,
play_queue,
editor,
]))))
))))
});
audio!(|self:SequencerTui, client, scope|{
// Start profiling cycle