feat: make win.setAspectRatio() work on Windows (#26941)

* feat: make win.setAspectRatio() work on Windows

* update patches

Co-authored-by: Electron Bot <electron@github.com>
This commit is contained in:
Cheng Zhao 2021-01-05 17:17:33 +09:00 committed by GitHub
parent 16c864a932
commit 5f99569b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 5 deletions

View file

@ -965,7 +965,7 @@ Returns `Boolean` - Whether the window is in simple (pre-Lion) fullscreen mode.
Returns `Boolean` - Whether the window is in normal state (not maximized, not minimized, not in fullscreen mode).
#### `win.setAspectRatio(aspectRatio[, extraSize])` _macOS_ _Linux_
#### `win.setAspectRatio(aspectRatio[, extraSize])`
* `aspectRatio` Float - The aspect ratio to maintain for some portion of the
content view.
@ -986,6 +986,9 @@ the player itself we would call this function with arguments of 16/9 and
are within the content view--only that they exist. Sum any extra width and
height areas you have within the overall content view.
The aspect ratio is not respected when window is resized programmingly with
APIs like `win.setSize`.
#### `win.setBackgroundColor(backgroundColor)`
* `backgroundColor` String - Window's background color as a hexadecimal value,