Replace placement calls with region nodes
This commit is contained in:
1 parent
f437495309
commit
71c9c39523
23 files changed
+374
-170
No files matched your search
@@ -30,7 +30,7 @@ fn a_selected_widget_retains_its_layout_events() {
|
||||
diagnostics::clear_traced_widgets();
|
||||
let _ = diagnostics::take();
|
||||
let mut harness = Harness::new((400, 200));
|
||||
let leaf = rect(Color::RED).add(&mut harness.rsc);
|
||||
let leaf = rect(Color::RED).region_node().add(&mut harness.rsc);
|
||||
let other = rect(Color::BLUE).add(&mut harness.rsc);
|
||||
let root = (leaf, other).span(Dir::RIGHT).add(&mut harness.rsc);
|
||||
harness.set_root(root);
|
||||
@@ -46,7 +46,7 @@ fn a_selected_widget_retains_its_layout_events() {
|
||||
report
|
||||
.traces()
|
||||
.iter()
|
||||
.any(|event| matches!(event, TraceEvent::Placed { id, .. } if *id == leaf.id()))
|
||||
.any(|event| matches!(event, TraceEvent::RegionNode { id, .. } if *id == leaf.id()))
|
||||
);
|
||||
assert!(
|
||||
report
|
||||
|
||||
Reference in new issue
Block a user