Measure container children without intermediate placement
This commit is contained in:
1 parent
c330ecec2b
commit
7601aa2a5d
6 files changed
+81
-38
No files matched your search
@@ -17,10 +17,7 @@ impl Widget for Scroll {
|
||||
let whole = UiRegion::FULL;
|
||||
let own = painter.placement();
|
||||
let answer_len =
|
||||
match painter.known_len(&self.inner, self.axis, whole, [Some(own.x), Some(own.y)]) {
|
||||
Some(len) => len,
|
||||
None => painter.widget(&self.inner).size().axis(self.axis),
|
||||
};
|
||||
painter.measure_len(&self.inner, self.axis, whole, [Some(own.x), Some(own.y)]);
|
||||
let content = answer_len.apply_leftover();
|
||||
self.container_len = container_len;
|
||||
self.content_len = content.to_px(container_len);
|
||||
|
||||
Reference in new issue
Block a user