mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
refactoring arranger into components
This commit is contained in:
parent
0bc43ed36f
commit
5670fc179b
4 changed files with 262 additions and 288 deletions
|
|
@ -582,10 +582,11 @@ impl<T: Widget<Engine = Tui>> Widget for Align<T> {
|
|||
})
|
||||
}
|
||||
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
|
||||
self.layout(to.area())?
|
||||
.map(|area|to.render_in(area, self.inner()))
|
||||
.transpose()
|
||||
.map(|x|x.flatten())
|
||||
if let Some(area) = self.layout(to.area())? {
|
||||
to.render_in(area, self.inner())
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue