Skip to content

Commit c5db387

Browse files
author
fbchen
committed
fix a bug
1 parent 9727a6e commit c5db387

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/constraint_layout.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,11 +1471,11 @@ class _ConstraintRenderBox extends RenderBox
14711471
14721472
double consMaxWidth = constraints.maxWidth;
14731473
if (consMaxWidth == double.infinity) {
1474-
consMaxWidth = window.physicalSize.width;
1474+
consMaxWidth = window.physicalSize.width / window.devicePixelRatio;
14751475
}
14761476
double consMaxHeight = constraints.maxHeight;
14771477
if (consMaxHeight == double.infinity) {
1478-
consMaxHeight = window.physicalSize.height;
1478+
consMaxHeight = window.physicalSize.height / window.devicePixelRatio;
14791479
}
14801480
size = constraints.constrain(Size(consMaxWidth, consMaxHeight));
14811481

0 commit comments

Comments
 (0)