Take a window read where a length is resolved against it
A widget that resolves a window length in pixels depends on that window wherever the length is a fraction of it, and nothing was recording that: Painter::to_px replaces window_px_len and pins the window it read, while a length that is only pixels is that many pixels in any window and pins nothing. Span still states the range it actually branched on, which replaces the pin with something wider. Scroll is where it showed: its content's answer is a window length now, so a viewport whose own box does not change with the window -- 40 px of a branch's box -- kept an end-snapped offset from the window before. Seed 942 at depth 6 under resize, pinned as unsettled::resizing_under_a_short_scroll_snaps_its_window_tall_content_again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1512d8418b
commit
23523eea29
6 files changed
+61
-13
No files matched your search
+1
-3
@@ -122,9 +122,7 @@ impl Widget for Branch {
|
||||
let measured = painter
|
||||
.widget_at(&self.probe, [None; 2], [Place::Within(Part::All), top])
|
||||
.len(Axis::X);
|
||||
let px = measured
|
||||
.apply_leftover()
|
||||
.to_px(painter.window_px_len(Axis::X));
|
||||
let px = painter.to_px(measured.apply_leftover(), Axis::X);
|
||||
|
||||
let below = Place::Within(Part::From(UiSpan::new(cut, painter.extent_len(Axis::Y))));
|
||||
let place = [Place::Within(Part::All), below];
|
||||
|
||||
Reference in new issue
Block a user