remove uses of Split, implement Bsp::area

This commit is contained in:
🪞👃🪞 2024-12-31 17:01:24 +01:00
parent 9f7b23a252
commit aa910540c0
5 changed files with 79 additions and 57 deletions

View file

@ -45,10 +45,10 @@ render!(Tui: (self: SequencerTui) => {
let phrase_w = if w > 60 { 20 } else if w > 40 { 15 } else { 10 };
let pool_w = if self.phrases.visible { phrase_w } else { 0 };
let pool = Pull::y(1, Fill::y(Align::e(PoolView(&self.phrases))));
let with_pool = move|x|Split::w(false, pool_w, pool, x);
let with_pool = move|x|Bsp::w(Fixed::x(pool_w, pool), x);
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_status = |x|Bsp::n(Fixed::x(if self.status { 2 } else { 0 }, status), x);
let with_editbar = |x|Bsp::n(Fixed::x(1, MidiEditStatus(&self.editor)), x);
let with_size = |x|lay!(self.size.clone(), x);
let editor = with_editbar(with_pool(Fill::xy(&self.editor)));