Fixed: Aristo3 - Various _CPImageAndTextView bugs (#2914)

This commit is contained in:
Didier Korthoudt
2022-03-21 14:28:21 +01:00
committed by GitHub
parent 93fc8d29cc
commit 3d514b5010
11 changed files with 1037 additions and 0 deletions
+7
View File
@@ -680,6 +680,13 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
imageWidth *= scale;
imageHeight *= scale;
}
else if (_imageScaling === CPImageScaleProportionallyUpOrDown)
{
var scale = MIN(size.width / imageWidth, size.height / imageHeight);
imageWidth *= scale;
imageHeight *= scale;
}
if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature))
imageStyle.filter = @"alpha(opacity=" + _shouldDimImage ? 50 : 100 + ")";