mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
shorten TuiIn, TuiOut
This commit is contained in:
parent
ca16a91015
commit
21741ebc52
20 changed files with 77 additions and 75 deletions
|
|
@ -26,7 +26,7 @@ impl<W: Content<Tui>> Content<Tui> for Bold<W> {
|
|||
fn content (&self) -> impl Content<Tui> {
|
||||
Some(&self.1)
|
||||
}
|
||||
fn render (&self, to: &mut TuiOutput) {
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
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) -> impl Content<Tui> {
|
||||
Some(&self.1)
|
||||
}
|
||||
fn render (&self, to: &mut TuiOutput) {
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
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) -> impl Content<Tui> {
|
||||
Some(&self.1)
|
||||
}
|
||||
fn render (&self, to: &mut TuiOutput) {
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
to.fill_bg(to.area(), self.0);
|
||||
self.1.render(to)
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ impl Content<Tui> for Styled<&str> {
|
|||
fn content (&self) -> impl Content<Tui> {
|
||||
Some(&self.1)
|
||||
}
|
||||
fn render (&self, to: &mut TuiOutput) {
|
||||
fn render (&self, to: &mut TuiOut) {
|
||||
// FIXME
|
||||
let [x, y, ..] = to.area();
|
||||
//let [w, h] = self.min_size(to.area().wh())?.unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue