mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-08-28 21:06:56 +02:00
109e...
This commit is contained in:
parent
b44dc635ef
commit
80fe958476
8 changed files with 69 additions and 45 deletions
|
|
@ -251,12 +251,12 @@ 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, iter_south(item_offset, item_height, bg(b, below!(
|
||||
w_full(origin_w(fg(fg, bold(selected, name)))),
|
||||
w_full(origin_e(fg(fg, bold(selected, length)))),
|
||||
w_full(origin_w(When::new(selected, bold(true, fg(g(255), "▶"))))),
|
||||
w_full(origin_e(When::new(selected, bold(true, fg(g(255), "◀"))))),
|
||||
))))
|
||||
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), "◀"))))),
|
||||
)))
|
||||
}))))
|
||||
}
|
||||
}
|
||||
|
|
@ -312,12 +312,14 @@ impl Browse {
|
|||
}
|
||||
impl Browse {
|
||||
fn tui (&self) -> impl Draw<Tui> {
|
||||
iter_south(1, ||EntriesIterator {
|
||||
let item = |entry, _index|w_full(origin_w(entry));
|
||||
let iterate = ||EntriesIterator {
|
||||
offset: 0,
|
||||
index: 0,
|
||||
length: self.dirs.len() + self.files.len(),
|
||||
browser: self,
|
||||
}, |entry, _index|w_full(origin_w(entry)))
|
||||
};
|
||||
iter_south_fixed(1, iterate, item)
|
||||
}
|
||||
}
|
||||
impl<'a> Iterator for EntriesIterator<'a> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue