mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: big flat pt.8: wh -> xy
This commit is contained in:
parent
da25b28ebf
commit
e958b4a2d2
27 changed files with 117 additions and 117 deletions
|
|
@ -120,23 +120,23 @@ render!(<Tui>|self:Groovebox|{
|
|||
let color = self.player.play_phrase().as_ref()
|
||||
.and_then(|(_,p)|p.as_ref().map(|p|p.read().unwrap().color))
|
||||
.clone();
|
||||
let transport = Fixed::h(3, row!([
|
||||
let transport = Fixed::y(3, row!([
|
||||
PlayPause(self.clock().is_rolling()),
|
||||
TransportView::new(self, color, true),
|
||||
]));
|
||||
let selector = Push::x(sampler_w, Fixed::h(1, row!(![
|
||||
let selector = Push::x(sampler_w, Fixed::y(1, row!(![
|
||||
PhraseSelector::play_phrase(&self.player),
|
||||
PhraseSelector::next_phrase(&self.player),
|
||||
])));
|
||||
let pool = move|x|Split::w(false, pool_w, Pull::y(1, Fill::h(Align::e(PoolView(&self.pool)))), x);
|
||||
let sampler = move|x|Split::e(false, sampler_w, Fill::wh(col!([
|
||||
let pool = move|x|Split::w(false, pool_w, Pull::y(1, Fill::y(Align::e(PoolView(&self.pool)))), x);
|
||||
let sampler = move|x|Split::e(false, sampler_w, Fill::xy(col!([
|
||||
Meters(self.sampler.input_meter.as_ref()),
|
||||
GrooveboxSamples(self)
|
||||
])), x);
|
||||
let status = EditStatus(&self.sampler, &self.editor, note_pt, pool(sampler(&self.editor)));
|
||||
Fill::wh(lay!([
|
||||
Fill::xy(lay!([
|
||||
&self.size,
|
||||
Fill::wh(Align::s(Fixed::h(2, GrooveboxStatus::from(self)))),
|
||||
Fill::xy(Align::s(Fixed::y(2, GrooveboxStatus::from(self)))),
|
||||
Shrink::y(2, col!(![transport, selector, status]))
|
||||
]))
|
||||
});
|
||||
|
|
@ -154,7 +154,7 @@ impl<'a, T: Render<Tui>> Content<Tui> for EditStatus<'a, T> {
|
|||
}),
|
||||
lay!([
|
||||
Outer(Style::default().fg(TuiTheme::g(128))),
|
||||
Fill::w(Fixed::h(8, if let Some((_, sample)) = &self.0.recording {
|
||||
Fill::x(Fixed::y(8, if let Some((_, sample)) = &self.0.recording {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
} else if let Some(sample) = &self.0.mapped[self.2] {
|
||||
SampleViewer(Some(sample.clone()))
|
||||
|
|
@ -171,7 +171,7 @@ render!(<Tui>|self: GrooveboxSamples<'a>|{
|
|||
let note_lo = self.0.editor.note_lo().load(Relaxed);
|
||||
let note_pt = self.0.editor.note_point();
|
||||
let note_hi = self.0.editor.note_hi();
|
||||
Fill::wh(col!(note in (note_lo..=note_hi).rev() => {
|
||||
Fill::xy(col!(note in (note_lo..=note_hi).rev() => {
|
||||
let mut bg = if note == note_pt { TuiTheme::g(64) } else { Color::Reset };
|
||||
let mut fg = TuiTheme::g(160);
|
||||
if let Some((index, _)) = self.0.sampler.recording {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue