summaryrefslogtreecommitdiff
path: root/src/layout/fixed.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-12 17:10:01 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-12 17:10:01 +0200
commit38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (patch)
tree967dab30f04537b93126586dbb7f7b0d166290e4 /src/layout/fixed.rs
parente94627721db89c3b08aa17f54d59d19a09f7816f (diff)
Synchronous layout 🪀
Diffstat (limited to 'src/layout/fixed.rs')
-rw-r--r--src/layout/fixed.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/layout/fixed.rs b/src/layout/fixed.rs
index 78a512e6..df099731 100644
--- a/src/layout/fixed.rs
+++ b/src/layout/fixed.rs
@@ -12,9 +12,8 @@ pub struct Fixed {
pub child: LayoutNode,
}
-#[async_trait(?Send)]
impl Layout for Fixed {
- async fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> {
+ fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Layouted> {
let Area { rem, full } = areas.current;
let size = Size::new(
self.width.map(|w| w.eval(full.width)).unwrap_or(rem.width),
@@ -22,7 +21,7 @@ impl Layout for Fixed {
);
let areas = Areas::once(size);
- self.child.layout(ctx, &areas).await
+ self.child.layout(ctx, &areas)
}
}