mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
fix toggling of pool
This commit is contained in:
parent
85cfb43e82
commit
6319c0db2d
2 changed files with 2 additions and 4 deletions
|
|
@ -15,7 +15,6 @@ pub struct ArrangerTui {
|
||||||
pub midi_buf: Vec<Vec<Vec<u8>>>,
|
pub midi_buf: Vec<Vec<Vec<u8>>>,
|
||||||
pub editor: PhraseEditorModel,
|
pub editor: PhraseEditorModel,
|
||||||
pub perf: PerfModel,
|
pub perf: PerfModel,
|
||||||
pub show_pool: bool,
|
|
||||||
}
|
}
|
||||||
impl ArrangerTui {
|
impl ArrangerTui {
|
||||||
pub fn selected (&self) -> ArrangerSelection {
|
pub fn selected (&self) -> ArrangerSelection {
|
||||||
|
|
@ -80,7 +79,6 @@ from_jack!(|jack| ArrangerTui {
|
||||||
midi_buf: vec![vec![];65536],
|
midi_buf: vec![vec![];65536],
|
||||||
note_buf: vec![],
|
note_buf: vec![],
|
||||||
perf: PerfModel::default(),
|
perf: PerfModel::default(),
|
||||||
show_pool: false,
|
|
||||||
jack: jack.clone(),
|
jack: jack.clone(),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -96,7 +94,7 @@ render!(<Tui>|self: ArrangerTui|{
|
||||||
let play = Fixed::wh(5, 2, PlayPause(self.clock.is_rolling()));
|
let play = Fixed::wh(5, 2, PlayPause(self.clock.is_rolling()));
|
||||||
let transport = TransportView::from((self, Some(ItemPalette::from(TuiTheme::g(96))), true));
|
let transport = TransportView::from((self, Some(ItemPalette::from(TuiTheme::g(96))), true));
|
||||||
let with_transport = |x|col!([row!(![&play, &transport]), &x]);
|
let with_transport = |x|col!([row!(![&play, &transport]), &x]);
|
||||||
let pool_size = if self.show_pool { self.splits[1] } else { 0 };
|
let pool_size = if self.phrases.visible { self.splits[1] } else { 0 };
|
||||||
let with_pool = |x|Split::left(false, pool_size, PoolView(&self.phrases), x);
|
let with_pool = |x|Split::left(false, pool_size, PoolView(&self.phrases), x);
|
||||||
let status = ArrangerStatus::from(self);
|
let status = ArrangerStatus::from(self);
|
||||||
let with_editbar = |x|Tui::split_n(false, 3, PhraseEditStatus(&self.editor), x);
|
let with_editbar = |x|Tui::split_n(false, 3, PhraseEditStatus(&self.editor), x);
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ input_to_command!(ArrangerCommand: <Tui>|state: ArrangerTui, input|match input.e
|
||||||
Self::Track(ArrangerTrackCommand::Add),
|
Self::Track(ArrangerTrackCommand::Add),
|
||||||
// Tab: Toggle visibility of phrase pool column
|
// Tab: Toggle visibility of phrase pool column
|
||||||
key_pat!(Tab) =>
|
key_pat!(Tab) =>
|
||||||
Self::Phrases(PhrasesCommand::Show(!state.show_pool)),
|
Self::Phrases(PhrasesCommand::Show(!state.phrases.visible)),
|
||||||
_ => to_arrangement_command(state, input).or_else(||{
|
_ => to_arrangement_command(state, input).or_else(||{
|
||||||
if let Some(command) = PhraseCommand::input_to_command(&state.editor, input) {
|
if let Some(command) = PhraseCommand::input_to_command(&state.editor, input) {
|
||||||
Some(Self::Editor(command))
|
Some(Self::Editor(command))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue