add iteration versions of row and col macros

This commit is contained in:
🪞👃🪞 2024-09-30 00:15:39 +03:00
parent ad39376659
commit fd2e8f83f6
3 changed files with 57 additions and 50 deletions

View file

@ -466,8 +466,9 @@ impl<S: BorderStyle, W: Widget<Engine = Tui>> Content for Bordered<S, W> {
fn content (&self) -> impl Widget<Engine = Tui> {
let style = self.0;
Layers::new(move|add|{
add(&Inset::XY(1, 1, &self.1 as &dyn Widget<Engine = Tui>))?;
add(&Border(style))?;
add(&Inset::XY(1, 1, &self.1 as &dyn Widget<Engine = Tui>))
Ok(())
}).fill_xy()
}
}