Render position

This commit is contained in:
2026-01-24 17:46:33 +01:00
parent 8f0712d4f8
commit 9953e4a0bc
3 changed files with 32 additions and 4 deletions
+15 -1
View File
@@ -23,7 +23,21 @@ fn main() {
}
fn app(cx: &Arc<Context>) -> View {
cx.child(my_component, None);
cx.child(
my_component,
Some(Arc::new(|ctx, view| {
let area = ctx.allocate(0, 0, 0, 0);
ctx.draw_view(area, view)
})),
);
cx.child(
my_component,
Some(Arc::new(|ctx, view| {
let area = ctx.allocate(0, 1, 0, 0);
ctx.draw_view(area, view)
})),
);
Arc::new({
let cx = cx.clone();