separate Input and Output impls

This commit is contained in:
🪞👃🪞 2025-01-05 22:01:54 +01:00
parent a6efde40f8
commit 0e821e098f
77 changed files with 465 additions and 454 deletions

View file

@ -3,10 +3,10 @@ use crate::*;
pub struct Field<T, U>(pub ItemPalette, pub T, pub U)
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync;
impl<T, U> Content<Tui> for Field<T, U>
impl<T, U> Content<TuiOut> for Field<T, U>
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync
{
fn content (&self) -> impl Render<Tui> {
fn content (&self) -> impl Render<TuiOut> {
let ItemPalette { darkest, dark, lighter, lightest, .. } = self.0;
row!(
Tui::fg_bg(dark.rgb, darkest.rgb, ""),
@ -20,10 +20,10 @@ impl<T, U> Content<Tui> for Field<T, U>
pub struct FieldV<T, U>(pub ItemPalette, pub T, pub U)
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync;
impl<T, U> Content<Tui> for FieldV<T, U>
impl<T, U> Content<TuiOut> for FieldV<T, U>
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync
{
fn content (&self) -> impl Render<Tui> {
fn content (&self) -> impl Render<TuiOut> {
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, ""));