fix: use contentAspectRatio not aspectRatio (#30305)

This commit is contained in:
Shelley Vohr 2021-07-29 23:27:21 +02:00 committed by GitHub
parent 39c3ff5292
commit 3ee6326b93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1601,7 +1601,7 @@ void NativeWindowMac::SetAspectRatio(double aspect_ratio,
// Reset the behaviour to default if aspect_ratio is set to 0 or less. // Reset the behaviour to default if aspect_ratio is set to 0 or less.
if (aspect_ratio > 0.0) if (aspect_ratio > 0.0)
[window_ setAspectRatio:NSMakeSize(aspect_ratio, 1.0)]; [window_ setContentAspectRatio:NSMakeSize(aspect_ratio, 1.0)];
else else
[window_ setResizeIncrements:NSMakeSize(1.0, 1.0)]; [window_ setResizeIncrements:NSMakeSize(1.0, 1.0)];
} }