WIP: Pad outside, Inset inside, and a report read raw

`Pad` moves its child's box in rather than shrinking it, `Inset` is the old
behaviour under a new name, and `in_parent_frame`'s composition and the
`reports_of` argument are gone -- a report comes up raw and the parent says
what it is a fraction of, which `Inset` does for itself.

Not landed. Everything passes except the new `Inset` test: a child declaring
`rel(0.5)` under an inset comes out 47.5 px wide of the 190 inside rather
than 95, and I have not accounted for where the second halving is. The
`Pad` half is green on its own -- the three tests that changed to `.inset()`
were using padding as scaffolding -- but landing it without a working
`Inset` would break every `.pad()` that meant inset.
This commit is contained in:
iris-ai committed 2026-09-17 04:38:53 -04:00
1 parent 1c80051d57
commit 950960cccd
4 files changed
+96 -13

No files matched your search

+1 -1
View File
@@ -462,7 +462,7 @@ fn a_change_two_levels_under_its_reader_still_reaches_it() {
let (leaf, _) = counted(&mut h, Size::px((100, 100).into()), true);
let padded = leaf.pad(10).add(&mut h.rsc);
let below = rect(Color::RED).add(&mut h.rsc);
h.set_root((padded, below).span(Dir::DOWN).pad(12));
h.set_root((padded, below).span(Dir::DOWN).inset(12));
assert_corners!(h, below, (12, 132), (388, 388));
h.rsc[leaf].size = Size::px((100, 200).into());