mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
improve ui legibility immensely right after release
This commit is contained in:
parent
b20ebbd7be
commit
83f840a412
5 changed files with 40 additions and 57 deletions
35
src/field.rs
35
src/field.rs
|
|
@ -7,16 +7,12 @@ impl<T, U> Content<Tui> for Field<T, U>
|
|||
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync
|
||||
{
|
||||
fn content (&self) -> impl Content<Tui> {
|
||||
let ItemPalette { darkest, dark, lighter, lightest, .. } = self.0;
|
||||
row!(
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "▐")),
|
||||
|
||||
Tui::bg(self.0.darker.rgb, Tui::fg(self.0.lighter.rgb,
|
||||
Tui::bold(true, format!("{}", self.1.as_ref())))),
|
||||
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "▌")),
|
||||
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.lightest.rgb,
|
||||
format!("{} ", self.2.as_ref())))
|
||||
Tui::fg_bg(dark.rgb, darkest.rgb, "▐"),
|
||||
Tui::fg_bg(lighter.rgb, dark.rgb, Tui::bold(true, format!("{}", self.1.as_ref()))),
|
||||
Tui::fg_bg(dark.rgb, darkest.rgb, "▌"),
|
||||
Tui::fg_bg(lightest.rgb, darkest.rgb, format!("{} ", self.2.as_ref()))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -28,18 +24,13 @@ impl<T, U> Content<Tui> for FieldV<T, U>
|
|||
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync
|
||||
{
|
||||
fn content (&self) -> impl Content<Tui> {
|
||||
Bsp::e(
|
||||
Bsp::s(
|
||||
row!(
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "▐")),
|
||||
Tui::bg(self.0.darker.rgb, Tui::fg(self.0.lighter.rgb,
|
||||
Tui::bold(true, format!("{}", self.1.as_ref())))),
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "▌")),
|
||||
),
|
||||
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.lightest.rgb,
|
||||
format!(" {}", self.2.as_ref())))
|
||||
),
|
||||
" "
|
||||
)
|
||||
let ItemPalette { darkest, dark, lighter, lightest, .. } = self.0;
|
||||
let sep1 = Tui::bg(darkest.rgb, Tui::fg(dark.rgb, "▐"));
|
||||
let sep2 = Tui::bg(darkest.rgb, Tui::fg(dark.rgb, "▌"));
|
||||
let name = Tui::bg(dark.rgb, Tui::fg(lighter.rgb,
|
||||
Tui::bold(true, format!("{}", self.1.as_ref()))));
|
||||
let value = Tui::bg(darkest.rgb, Tui::fg(lightest.rgb,
|
||||
format!(" {} ", self.2.as_ref())));
|
||||
Bsp::e(Bsp::s(row!(sep1, name, sep2), value), " ")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue