mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
can't believe this one worked
This commit is contained in:
parent
3dd8a7bc0d
commit
a702170d16
1 changed files with 1 additions and 4 deletions
|
|
@ -11,13 +11,10 @@ render!(TuiOut: (self: PoolView<'a>) => {
|
|||
let item_height = 1;
|
||||
let item_offset = i as u16 * item_height;
|
||||
let selected = i == model.phrase_index();
|
||||
let offset = |a|Push::y(item_offset, Align::n(Fixed::y(item_height, Fill::x(a))));
|
||||
|
||||
let MidiClip { ref name, color, length, .. } = *clip.read().unwrap();
|
||||
let name = if *compact { format!(" {i:>3}") } else { format!(" {i:>3} {name}") };
|
||||
let length = if *compact { String::default() } else { format!("{length} ") };
|
||||
|
||||
offset(Tui::bg(if selected { color.light.rgb } else { color.base.rgb }, lay!(
|
||||
map_south(item_offset, item_height, Tui::bg(if selected { color.light.rgb } else { color.base.rgb }, lay!(
|
||||
Align::w(Tui::fg(color.lightest.rgb, Tui::bold(selected, name))),
|
||||
Align::e(Tui::fg(color.lightest.rgb, Tui::bold(selected, length))),
|
||||
Align::w(When(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "▶")))),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue