mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
update layout macro invocations
This commit is contained in:
parent
e677d1d7d4
commit
83eb9dd2fa
19 changed files with 153 additions and 169 deletions
|
|
@ -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) }
|
||||
}
|
||||
)+}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue