Experiment: say the room from the cursor as an inset, and read the row's length only where a slot depends on it
Measured identical to its parent at every phase of the cost rig; kept as evidence, not proposed for landing.
This commit is contained in:
1 parent
f6242aa33c
commit
5b181bc8af
5 files changed
+80
-34
No files matched your search
@@ -20,10 +20,10 @@ impl Widget for Pad {
|
||||
// The two stay distinct -- the box can be narrower still, where a row
|
||||
// asked this widget in the room left, and a text wraps at that.
|
||||
let inset = |lead: Px, trail: Px| {
|
||||
Place::Within(Part::Of(UiSpan::new(
|
||||
Len::from_parts(Rel::ZERO, lead),
|
||||
Len::from_parts(Rel::ONE, -trail),
|
||||
)))
|
||||
Place::Within(Part::Inset {
|
||||
lead: Len::from_parts(Rel::ZERO, lead),
|
||||
trail: Len::from_parts(Rel::ZERO, trail),
|
||||
})
|
||||
};
|
||||
let place = [
|
||||
inset(self.padding.left, self.padding.right),
|
||||
|
||||
Reference in new issue
Block a user