Add Resize widget
This commit is contained in:
parent
ba716dd089
commit
b27cb81642
3 changed files with 112 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
use async_trait::async_trait;
|
||||
|
||||
use crate::widgets::{Background, Border, Either, Either3, Float, JoinSegment, Layer, Padding};
|
||||
use crate::widgets::{
|
||||
Background, Border, Either, Either3, Float, JoinSegment, Layer, Padding, Resize,
|
||||
};
|
||||
use crate::{Frame, Size};
|
||||
|
||||
// TODO Feature-gate these traits
|
||||
|
|
@ -76,6 +78,10 @@ pub trait WidgetExt: Sized {
|
|||
fn padding(self) -> Padding<Self> {
|
||||
Padding::new(self)
|
||||
}
|
||||
|
||||
fn resize(self) -> Resize<Self> {
|
||||
Resize::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
// It would be nice if this could be restricted to types implementing Widget.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue