remove tek_proc; add Border

This commit is contained in:
🪞👃🪞 2024-09-13 03:26:59 +03:00
parent 6624fb476c
commit 70cef99931
9 changed files with 103 additions and 81 deletions

View file

@ -36,26 +36,30 @@ impl Demo<Tui> {
impl Content for Demo<Tui> {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
Align::Center(Layers::new(|add|{
let border_style = Style::default().fg(Color::Rgb(0,0,0));
Align::Center(Layers::new(move|add|{
add(&Background(Color::Rgb(0,128,128)))?;
add(&Outset::XY(1, 1, Split::down(|add|{
add(&Layers::new(|add|{
add(&Background(Color::Rgb(255,255,0)))?;
add(&Background(Color::Rgb(128,96,0)))?;
add(&Border(Square(border_style)))?;
add(&Outset::XY(2, 1, "..."))?;
Ok(())
}))?;
add(&Layers::new(|add|{
add(&Background(Color::Rgb(255,128,0)))?;
add(&Background(Color::Rgb(128,64,0)))?;
add(&Border(Lozenge(border_style)))?;
add(&Outset::XY(4, 2, "---"))?;
Ok(())
}))?;
add(&Layers::new(|add|{
add(&Background(Color::Rgb(128,128,0)))?;
add(&Background(Color::Rgb(96,64,0)))?;
add(&Border(SquareBold(border_style)))?;
add(&Outset::XY(6, 3, "~~~"))?;
Ok(())
}))?;