Add Empty widget
This commit is contained in:
parent
d2c4d2b029
commit
204eb95fa5
2 changed files with 16 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
pub mod background;
|
pub mod background;
|
||||||
|
pub mod empty;
|
||||||
pub mod list;
|
pub mod list;
|
||||||
pub mod text;
|
pub mod text;
|
||||||
|
|
||||||
|
|
|
||||||
15
src/ui/widgets/empty.rs
Normal file
15
src/ui/widgets/empty.rs
Normal 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) {}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue