comments
This commit is contained in:
parent
7aaf974362
commit
ac6e4aff5e
1 changed files with 5 additions and 0 deletions
|
@ -709,6 +709,11 @@ bool NativeWindowMac::IsResizable() {
|
|||
void NativeWindowMac::SetAspectRatio(double aspect_ratio,
|
||||
const gfx::Size& extra_size) {
|
||||
|
||||
// We can't just pass the aspect ratio to Cocoa, since our API receives
|
||||
// it as a float, and Cocoa expects an NSRect with explicit width & height
|
||||
// arguments. Instead we derive those args ourselves from the given aspect
|
||||
// ratio.
|
||||
|
||||
gfx::Size windowSize = this->GetSize();
|
||||
gfx::Size contentSize = this->GetContentSize();
|
||||
|
||||
|
|
Loading…
Reference in a new issue