Add Empty widget

This commit is contained in:
Joscha 2022-07-12 21:42:21 +02:00
parent d2c4d2b029
commit 204eb95fa5
2 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,5 @@
pub mod background;
pub mod empty;
pub mod list;
pub mod text;

15
src/ui/widgets/empty.rs Normal file
View file

@ -0,0 +1,15 @@
use async_trait::async_trait;
use toss::frame::{Frame, Pos, Size};
use super::Widget;
pub struct Empty;
#[async_trait]
impl Widget for Empty {
fn size(&self, _frame: &mut Frame, _max_width: Option<u16>, _max_height: Option<u16>) -> Size {
Size::ZERO
}
async fn render(self: Box<Self>, _frame: &mut Frame, _pos: Pos, _size: Size) {}
}