mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
errors fixed, renders nothing :(
This commit is contained in:
parent
b3f0f60400
commit
4cca03352a
9 changed files with 47 additions and 44 deletions
|
|
@ -198,20 +198,6 @@ pub enum TuiEvent {
|
|||
// Jack(JackEvent)
|
||||
}
|
||||
|
||||
/// Rendering unit struct to Ratatui returns zero-sized [Area] at render coordinates.
|
||||
impl Render<Tui> for () {
|
||||
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
|
||||
self.layout(to.area())
|
||||
}
|
||||
}
|
||||
|
||||
/// Layout of unit struct in Ratatui is zero-sized [Area] at render coordinates.
|
||||
impl Layout<Tui> for () {
|
||||
fn layout (&self, area: [u16;4]) -> Perhaps<[u16;4]> {
|
||||
Ok(Some([area.x(), area.y(), 0, 0]))
|
||||
}
|
||||
}
|
||||
|
||||
impl Area<u16> for Rect {
|
||||
fn x (&self) -> u16 { self.x }
|
||||
fn y (&self) -> u16 { self.y }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue