Add Float widget

This commit is contained in:
Joscha 2023-02-16 15:12:27 +01:00
parent bcc07dc9ba
commit 575faf9bbf
4 changed files with 137 additions and 12 deletions

View file

@ -1,6 +1,6 @@
use async_trait::async_trait;
use crate::widgets::{Border, Padding};
use crate::widgets::{Border, Float, Padding};
use crate::{Frame, Size};
// TODO Feature-gate these traits
@ -33,6 +33,10 @@ pub trait WidgetExt: Sized {
Border::new(self)
}
fn float(self) -> Float<Self> {
Float::new(self)
}
fn padding(self) -> Padding<Self> {
Padding::new(self)
}
@ -45,6 +49,10 @@ pub trait AsyncWidgetExt: Sized {
Border::new(self)
}
fn float(self) -> Float<Self> {
Float::new(self)
}
fn padding(self) -> Padding<Self> {
Padding::new(self)
}