mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-02-22 02:59:02 +01:00
- output: impl Layout for Measure, FieldH, FieldV - tui: enable #[feature(trait_alias)] - tui: define some trait aliases
This commit is contained in:
parent
90fc869e14
commit
731f4a971e
13 changed files with 166 additions and 147 deletions
|
|
@ -15,7 +15,7 @@ impl<O: Out, T: Layout<O>> Layout<O> for When<O, T> {
|
|||
impl<O: Out, T: Content<O>> Draw<O> for When<O, T> {
|
||||
fn draw (&self, to: &mut O) {
|
||||
let Self(cond, item, ..) = self;
|
||||
if *cond { Bound(self.layout(to.area()), item).draw(to) }
|
||||
if *cond { Bounded(self.layout(to.area()), item).draw(to) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ impl<E: Out, A: Content<E>, B: Content<E>> Draw<E> for Either<E, A, B> {
|
|||
fn draw (&self, to: &mut E) {
|
||||
let Self(cond, a, b, ..) = self;
|
||||
let area = self.layout(to.area());
|
||||
if *cond { Bound(area, a).draw(to) } else { Bound(area, b).draw(to) }
|
||||
if *cond { Bounded(area, a).draw(to) } else { Bounded(area, b).draw(to) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue