mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
groovebox: fix alignment
This commit is contained in:
parent
d88f4e33eb
commit
0f9cb1437f
2 changed files with 5 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ view!(TuiOut: |self: Tek| self.size.of(View(self, self.view)); {
|
|||
ArrangerView::new(self).boxed(),
|
||||
":editor" =>
|
||||
self.editor.as_ref()
|
||||
.map(|e|Bsp::s(Bsp::e(e.clip_status(), e.edit_status()), e))
|
||||
.map(|e|Bsp::n(Bsp::e(e.clip_status(), e.edit_status()), e))
|
||||
.boxed(),
|
||||
":sample" =>
|
||||
().boxed(),//self.view_sample(self.is_editing()).boxed(),
|
||||
|
|
|
|||
|
|
@ -61,10 +61,11 @@ impl Sampler {
|
|||
let note_lo = editor.note_lo().load(Relaxed);
|
||||
let note_pt = editor.note_pos();
|
||||
let note_hi = editor.note_hi();
|
||||
Fixed::x(16, Map::new(
|
||||
Fixed::x(16, Map::south(
|
||||
1,
|
||||
move||(note_lo..=note_hi).rev(),
|
||||
move|note, i| {
|
||||
let offset = |a|Push::y(i as u16, Align::n(Fixed::y(1, Fill::x(a))));
|
||||
//let offset = |a|Push::y(i as u16, Align::n(Fixed::y(1, Fill::x(a))));
|
||||
let mut bg = if note == note_pt { Tui::g(64) } else { Color::Reset };
|
||||
let mut fg = Tui::g(160);
|
||||
let mapped: &Option<Arc<RwLock<Sample>>> = &self.mapped[note];
|
||||
|
|
@ -78,7 +79,7 @@ impl Sampler {
|
|||
fg = Color::Rgb(224,64,32)
|
||||
}
|
||||
}
|
||||
offset(Tui::fg_bg(fg, bg, format!("{note:3} {}", self.view_list_item(note, compact))))
|
||||
Tui::fg_bg(fg, bg, format!("{note:3} {}", self.view_list_item(note, compact)))
|
||||
}))
|
||||
}
|
||||
pub fn view_list_item (&self, note: usize, compact: bool) -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue