mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-08-28 21:06:56 +02:00
convert to layout suffixes
This commit is contained in:
parent
2d64f63741
commit
d8a767326c
6 changed files with 245 additions and 230 deletions
|
|
@ -241,7 +241,7 @@ impl<'a> PoolView<'a> {
|
|||
//let on_bg = |x|x;//below(Repeat(" "), bg(color.darkest.term, x));
|
||||
//let border = |x|x;//Outer(Style::default().fg(color.dark.term).bg(color.darkest.term)).enclose(x);
|
||||
//let height = pool.clips.read().unwrap().len() as u16;
|
||||
w_exact(20, h_full(origin_n(iter(
|
||||
origin_n(iter(
|
||||
||pool.clips().clone().into_iter(),
|
||||
move|clip: Arc<RwLock<MidiClip>>, i: usize|{
|
||||
let MidiClip { ref name, color, length, .. } = *clip.read().unwrap();
|
||||
|
|
@ -252,13 +252,13 @@ impl<'a> PoolView<'a> {
|
|||
let f = color.lightest.term;
|
||||
let name = if false { format!(" {i:>3}") } else { format!(" {i:>3} {name}") };
|
||||
let length = if false { String::default() } else { format!("{length} ") };
|
||||
h_exact(1, bg(b, below!(
|
||||
w_full(origin_w(fg(f, bold(selected, name)))),
|
||||
w_full(origin_e(fg(f, bold(selected, length)))),
|
||||
w_full(origin_w(when(selected, bold(true, fg(g(255), "▶"))))),
|
||||
w_full(origin_e(when(selected, bold(true, fg(g(255), "◀"))))),
|
||||
)))
|
||||
}))))
|
||||
bg(b, below!(
|
||||
origin_w(fg(f, bold(selected, name))).full_w(),
|
||||
origin_e(fg(f, bold(selected, length))).full_w(),
|
||||
origin_w(when(selected, bold(true, fg(g(255), "▶")))).full_w(),
|
||||
origin_e(when(selected, bold(true, fg(g(255), "◀")))).full_w(),
|
||||
)).exact_h(1)
|
||||
})).full_h().exact_w(20)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ impl Browse {
|
|||
|
||||
impl Browse {
|
||||
fn tui (&self) -> impl Draw<Tui> {
|
||||
let item = |entry, _index|w_full(origin_w(entry));
|
||||
let item = |entry, _index|origin_w(entry).full_w();
|
||||
let iterate = ||EntriesIterator {
|
||||
offset: 0,
|
||||
index: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue