Untitled
unknown
rust
2 years ago
937 B
8
Indexable
use anyhow::{Context, Result};
use phace::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
use layout::prelude::*;
let mut layout = layout(
flex_row()
.append(
component(views::fill('1'))
.max_width(unit!(25 %))
.max_height(unit!(25 pt))
.margin(unit!(1 pt))
.padding(unit!(1 pt)),
)
.append(
flex_column()
.append(
component(views::fill('2'))
.max_height(unit!(40 %))
.margin(unit!(1 pt))
.padding(unit!(1 pt)),
)
.append(views::fill('3')),
),
)
.bind_focus_next(Key::Tab)
.theme(Theme::dos())
.build()?;
Tui::new(layout).start().await.context("tui error")
}
Editor is loading...
Leave a Comment