Add JoinH and JoinV

This commit is contained in:
Joscha 2023-02-18 18:54:51 +01:00
parent 828bba464a
commit f581fa6c47
2 changed files with 324 additions and 1 deletions

View file

@ -1,6 +1,6 @@
use async_trait::async_trait;
use crate::widgets::{Background, Border, Either, Either3, Float, Layer, Padding};
use crate::widgets::{Background, Border, Either, Either3, Float, JoinSegment, Layer, Padding};
use crate::{Frame, Size};
// TODO Feature-gate these traits
@ -61,6 +61,10 @@ pub trait WidgetExt: Sized {
Float::new(self)
}
fn segment(self) -> JoinSegment<Self> {
JoinSegment::new(self)
}
fn below<W>(self, above: W) -> Layer<Self, W> {
Layer::new(self, above)
}