mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-08 12:46:44 +01:00
tui: ItemPalette->ItemTheme
This commit is contained in:
parent
aa66760b8c
commit
7ba37f3f02
2 changed files with 9 additions and 9 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use crate::*;
|
||||
|
||||
pub struct FieldH<T, U>(pub ItemPalette, pub T, pub U);
|
||||
pub struct FieldH<T, U>(pub ItemTheme, pub T, pub U);
|
||||
impl<T: Content<TuiOut>, U: Content<TuiOut>> Content<TuiOut> for FieldH<T, U> {
|
||||
fn content (&self) -> impl Render<TuiOut> {
|
||||
let Self(ItemPalette { darkest, dark, lighter, lightest, .. }, title, value) = self;
|
||||
let Self(ItemTheme { darkest, dark, lighter, lightest, .. }, title, value) = self;
|
||||
row!(
|
||||
Tui::fg_bg(dark.rgb, darkest.rgb, "▐"),
|
||||
Tui::fg_bg(lighter.rgb, dark.rgb, Tui::bold(true, title)),
|
||||
|
|
@ -13,10 +13,10 @@ impl<T: Content<TuiOut>, U: Content<TuiOut>> Content<TuiOut> for FieldH<T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct FieldV<T, U>(pub ItemPalette, pub T, pub U);
|
||||
pub struct FieldV<T, U>(pub ItemTheme, pub T, pub U);
|
||||
impl<T: Content<TuiOut>, U: Content<TuiOut>> Content<TuiOut> for FieldV<T, U> {
|
||||
fn content (&self) -> impl Render<TuiOut> {
|
||||
let Self(ItemPalette { darkest, dark, lighter, lightest, .. }, title, value) = self;
|
||||
let Self(ItemTheme { darkest, dark, lighter, lightest, .. }, title, value) = self;
|
||||
let sep1 = Tui::bg(darkest.rgb, Tui::fg(dark.rgb, "▐"));
|
||||
let sep2 = Tui::bg(darkest.rgb, Tui::fg(dark.rgb, "▌"));
|
||||
let title = Tui::bg(dark.rgb, Tui::fg(lighter.rgb, Tui::bold(true, title)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue