Fix the calculation of image heights in ImageFit.scaleDown mode (#4939)
Fixes https://github.com/flutter/flutter/issues/4407
This commit is contained in:
parent
05e200f12a
commit
94d1104429
@ -869,7 +869,7 @@ void paintImage({
|
|||||||
if (destinationSize.height > outputSize.height)
|
if (destinationSize.height > outputSize.height)
|
||||||
destinationSize = new Size(outputSize.height * aspectRatio, outputSize.height);
|
destinationSize = new Size(outputSize.height * aspectRatio, outputSize.height);
|
||||||
if (destinationSize.width > outputSize.width)
|
if (destinationSize.width > outputSize.width)
|
||||||
destinationSize = new Size(outputSize.width, outputSize.height / aspectRatio);
|
destinationSize = new Size(outputSize.width, outputSize.width / aspectRatio);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (centerSlice != null) {
|
if (centerSlice != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user