update layout macro invocations

This commit is contained in:
🪞👃🪞 2024-12-31 04:37:45 +01:00
parent e677d1d7d4
commit 83eb9dd2fa
19 changed files with 153 additions and 169 deletions

View file

@ -3,7 +3,7 @@ use crate::*;
pub struct Bordered<S: BorderStyle, W: Content<Tui>>(pub S, pub W);
render!(Tui: (self: Bordered<S: BorderStyle, W: Content<Tui>>) => {
Fill::xy(lay!([Border(self.0), Padding::xy(1, 1, &self.1)]))
Fill::xy(lay!(Border(self.0), Padding::xy(1, 1, &self.1)))
});
pub struct Border<S: BorderStyle>(pub S);
@ -130,8 +130,7 @@ macro_rules! border {
#[derive(Copy, Clone)]
pub struct $T(pub Style);
impl Content<Tui> for $T {
fn min_size (&self, _: [u16;2]) -> Perhaps<[u16;2]> { Ok(Some([0,0])) }
fn render (&self, to: &mut TuiOutput) -> Usually<()> { self.draw(to) }
fn render (&self, to: &mut TuiOutput) { self.draw(to) }
}
)+}
}