mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
start implementing edn loader; remove PhantomData from some tek_layout constructs
This commit is contained in:
parent
f359768ba2
commit
2b07e7963e
20 changed files with 239 additions and 222 deletions
|
|
@ -7,7 +7,7 @@ render!(Tui: (self: PoolView<'a>) => {
|
|||
let color = self.1.phrase().read().unwrap().color;
|
||||
Outer(
|
||||
Style::default().fg(color.dark.rgb).bg(color.darkest.rgb)
|
||||
).enclose(Tui::map(||model.phrases().iter(), |clip, i|{
|
||||
).enclose(Map(||model.phrases().iter(), |clip, i|{
|
||||
let item_height = 1;
|
||||
let item_offset = i as u16 * item_height;
|
||||
let selected = i == model.phrase_index();
|
||||
|
|
@ -20,8 +20,8 @@ render!(Tui: (self: PoolView<'a>) => {
|
|||
offset(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(Tui::when(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "▶")))),
|
||||
Align::e(Tui::when(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "◀")))),
|
||||
Align::w(When(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "▶")))),
|
||||
Align::e(When(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "◀")))),
|
||||
)))
|
||||
}))
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue