mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-04-04 05:10:44 +02:00
unified compact flag in groovebox
This commit is contained in:
parent
c9a79b1f29
commit
511ff91864
12 changed files with 129 additions and 188 deletions
|
|
@ -17,7 +17,7 @@ mod arranger_v_sep; pub(crate) use self::arranger_v_sep::*;
|
|||
pub struct ArrangerTui {
|
||||
jack: Arc<RwLock<JackConnection>>,
|
||||
pub clock: Clock,
|
||||
pub phrases: PoolModel,
|
||||
pub pool: PoolModel,
|
||||
pub tracks: Vec<ArrangerTrack>,
|
||||
pub scenes: Vec<ArrangerScene>,
|
||||
pub splits: [u16;2],
|
||||
|
|
@ -81,7 +81,7 @@ from_jack!(|jack| ArrangerTui {
|
|||
)));
|
||||
Self {
|
||||
clock,
|
||||
phrases: (&phrase).into(),
|
||||
pool: (&phrase).into(),
|
||||
editor: (&phrase).into(),
|
||||
selected: ArrangerSelection::Clip(0, 0),
|
||||
scenes: vec![],
|
||||
|
|
@ -105,8 +105,8 @@ impl ArrangerTui {
|
|||
}
|
||||
}
|
||||
render!(Tui: (self: ArrangerTui) => {
|
||||
let pool_size = if self.phrases.visible { self.splits[1] } else { 0 };
|
||||
let with_pool = |x|Bsp::w(Fixed::x(pool_size, PoolView(&self.phrases)), x);
|
||||
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);
|
||||
|
|
@ -162,6 +162,6 @@ audio!(|self: ArrangerTui, client, scope|{
|
|||
return Control::Continue
|
||||
});
|
||||
has_clock!(|self: ArrangerTui|&self.clock);
|
||||
has_phrases!(|self: ArrangerTui|self.phrases.phrases);
|
||||
has_phrases!(|self: ArrangerTui|self.pool.phrases);
|
||||
has_editor!(|self: ArrangerTui|self.editor);
|
||||
handle!(<Tui>|self: ArrangerTui, input|ArrangerCommand::execute_with_state(self, input));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue