Replace placement calls with region nodes

This commit is contained in:
iris-ai committed 2026-09-15 18:02:28 -04:00
1 parent f437495309
commit 71c9c39523
23 files changed
+374 -170

No files matched your search

+3 -3
View File
@@ -23,14 +23,14 @@ impl Widget for BranchesOnMeasurement {
fn draw(&mut self, painter: &mut Painter) -> Size {
let mut top = UiRegion::FULL;
top.y.end = top.y.start.offset(40.0);
let measured = painter.place(&self.probe, top).len(Axis::X);
let measured = painter.widget_within(&self.probe, top).len(Axis::X);
let px = measured.apply_leftover().to_px(painter.px_len(Axis::X));
let mut below = UiRegion::FULL;
below.y.start = below.y.start.offset(40.0);
match px > self.threshold {
true => painter.place(&self.wide, below),
false => painter.place(&self.narrow, below),
true => painter.widget_within(&self.wide, below),
false => painter.widget_within(&self.narrow, below),
};
Size::LEFTOVER
}