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:
parent
16c864a932
commit
5f99569b6c
6 changed files with 51 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue