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

@ -26,7 +26,7 @@ impl<W: Content<Tui>> Content<Tui> for Bold<W> {
fn content (&self) -> Option<impl Content<Tui>> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) -> Usually<()> {
fn render (&self, to: &mut TuiOutput) {
to.fill_bold(to.area(), self.0);
self.1.render(to)
}
@ -38,7 +38,7 @@ impl<W: Content<Tui>> Content<Tui> for Foreground<W> {
fn content (&self) -> Option<impl Content<Tui>> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) -> Usually<()> {
fn render (&self, to: &mut TuiOutput) {
to.fill_fg(to.area(), self.0);
self.1.render(to)
}
@ -50,7 +50,7 @@ impl<W: Content<Tui>> Content<Tui> for Background<W> {
fn content (&self) -> Option<impl Content<Tui>> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) -> Usually<()> {
fn render (&self, to: &mut TuiOutput) {
to.fill_bg(to.area(), self.0);
self.1.render(to)
}
@ -62,7 +62,7 @@ impl Content<Tui> for Styled<&str> {
fn content (&self) -> Option<impl Content<Tui>> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) -> Usually<()> {
fn render (&self, to: &mut TuiOutput) {
// FIXME
let [x, y, ..] = to.area();
//let [w, h] = self.min_size(to.area().wh())?.unwrap();