mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 20:26:42 +01:00
shrink sampler
This commit is contained in:
parent
6c266fcfca
commit
5bd9068bbe
3 changed files with 8 additions and 7 deletions
|
|
@ -89,15 +89,14 @@ render!(Tui: (self: Groovebox) => {
|
|||
let w = self.size.w();
|
||||
let phrase_w = if w > 60 { 20 } else if w > 40 { 15 } else { 10 };
|
||||
let pool_w = if !self.compact { phrase_w } else { 5 };
|
||||
let sampler_w = if !self.compact { phrase_w } else { 4 };
|
||||
let sampler_w = if !self.compact { 11 } else { 4 };
|
||||
let sample_h = if !self.compact { 5 } else { 0 };
|
||||
let note_pt = self.editor.note_point();
|
||||
let color = self.player.play_phrase().as_ref()
|
||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||
.clone();
|
||||
|
||||
let sampler =
|
||||
Fixed::x(sampler_w, Push::y(1, Align::w(Fill::y(SampleList::new(self.compact, &self.sampler, &self.editor)))));
|
||||
let sampler = Fixed::x(sampler_w, Push::y(if self.compact { 1 } else { 0 },
|
||||
Align::w(Fill::y(SampleList::new(self.compact, &self.sampler, &self.editor)))));
|
||||
let selectors =
|
||||
Bsp::e(ClipSelected::play_phrase(&self.player), ClipSelected::next_phrase(&self.player));
|
||||
let edit_clip =
|
||||
|
|
@ -125,7 +124,7 @@ render!(Tui: (self: Groovebox) => {
|
|||
Align::x(Fixed::y(1, MidiEditStatus(&self.editor))),
|
||||
),
|
||||
Bsp::w(
|
||||
Fixed::x(pool_w, Align::e(Fill::y(PoolView(self.compact, &self.pool)))),
|
||||
Fixed::x(pool_w, PoolView(self.compact, &self.pool)),
|
||||
Fill::xy(Bsp::e(sampler, &self.editor)),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue