Unverified Commit 55044a60 authored by Tomasz Gucio's avatar Tomasz Gucio Committed by GitHub

Constrain _RenderScaledInlineWidget child size in computeDryLayout (#131765)

parent 7de053b2
......@@ -385,7 +385,7 @@ class _RenderScaledInlineWidget extends RenderBox with RenderObjectWithChildMixi
Size computeDryLayout(BoxConstraints constraints) {
assert(!constraints.hasBoundedHeight);
final Size unscaledSize = child?.computeDryLayout(BoxConstraints(maxWidth: constraints.maxWidth / scale)) ?? Size.zero;
return unscaledSize * scale;
return constraints.constrain(unscaledSize * scale);
}
@override
......
......@@ -273,8 +273,8 @@ void main() {
textDirection: TextDirection.ltr,
child: Center(
child: SizedBox(
width: 100.3,
child: Text.rich(WidgetSpan(child: Row()), textScaleFactor: 0.3),
width: 502.5454545454545,
child: Text.rich(WidgetSpan(child: Row()), textScaleFactor: 0.95),
),
),
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment