diff --git a/src/arranger.rs b/src/arranger.rs index 5906fe93..92545ec2 100644 --- a/src/arranger.rs +++ b/src/arranger.rs @@ -105,25 +105,21 @@ impl Arranger { } } render!(TuiOut: (self: Arranger) => { - let pool_size = if self.pool.visible { self.splits[1] } else { 0 }; - let with_pool = |x|Bsp::w(Fixed::x(pool_size, PoolView(self.pool.visible, &self.pool)), x); - let status = ArrangerStatus::from(self); - let with_editbar = |x|Bsp::n(Fixed::y(1, MidiEditStatus(&self.editor)), x); - let with_status = |x|Bsp::n(Fixed::y(2, status), x); - let with_size = |x|lay!(&self.size, x); - let arranger = ||{ - let color = self.color; - 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!( - TransportView::new(true, &self.clock), - Fill::x(Fixed::y(20, arranger())), - Fill::xy(&self.editor), - ))))) + let pool_w = if self.pool.visible { self.splits[1] } else { 0 }; + let color = self.color; + self.size.of( + Bsp::n(Fixed::y(2, ArrangerStatus::from(self)), + Bsp::n(Fixed::y(1, MidiEditStatus(&self.editor)), + Bsp::w(Fixed::x(pool_w, PoolView(self.pool.visible, &self.pool)), + col!( + TransportView::new(true, &self.clock), + Fill::x(Fixed::y(20, 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), + ))), + Fill::xy(&"FIXME: editor"), + ))))) }); audio!(|self: Arranger, client, scope|{ // Start profiling cycle