diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:10:01 +0200 |
| commit | 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (patch) | |
| tree | 967dab30f04537b93126586dbb7f7b0d166290e4 /src/layout/stack.rs | |
| parent | e94627721db89c3b08aa17f54d59d19a09f7816f (diff) | |
Synchronous layout 🪀
Diffstat (limited to 'src/layout/stack.rs')
| -rw-r--r-- | src/layout/stack.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/layout/stack.rs b/src/layout/stack.rs index 2f3ceed8..9aeb80aa 100644 --- a/src/layout/stack.rs +++ b/src/layout/stack.rs @@ -16,12 +16,11 @@ pub struct Stack { pub children: Vec<LayoutNode>, } -#[async_trait(?Send)] impl Layout for Stack { - async fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> { let mut layouter = StackLayouter::new(self, areas.clone()); for child in &self.children { - for layouted in child.layout(ctx, &layouter.areas).await { + for layouted in child.layout(ctx, &layouter.areas) { match layouted { Layouted::Spacing(spacing) => layouter.spacing(spacing), Layouted::Boxed(boxed, aligns) => layouter.boxed(boxed, aligns), |
