Skip to content

Commit 94d1104

Browse files
Fix the calculation of image heights in ImageFit.scaleDown mode (#4939)
Fixes #4407
1 parent 05e200f commit 94d1104

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/flutter/lib/src/painting/box_painter.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ void paintImage({
869869
if (destinationSize.height > outputSize.height)
870870
destinationSize = new Size(outputSize.height * aspectRatio, outputSize.height);
871871
if (destinationSize.width > outputSize.width)
872-
destinationSize = new Size(outputSize.width, outputSize.height / aspectRatio);
872+
destinationSize = new Size(outputSize.width, outputSize.width / aspectRatio);
873873
break;
874874
}
875875
if (centerSlice != null) {

0 commit comments

Comments
 (0)