mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
separate Input and Output impls
This commit is contained in:
parent
a6efde40f8
commit
0e821e098f
77 changed files with 465 additions and 454 deletions
|
|
@ -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, "▌"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue