fix: normalize behavior of win.setOpacity() for invalid number values across operating systems (#19535) (#19673)

This commit is contained in:
Erick Zhao
2019-08-07 13:11:12 -07:00
committed by Shelley Vohr
parent 0bdb7b164c
commit 0299f69fd1
4 changed files with 53 additions and 23 deletions

View File

@@ -1455,11 +1455,13 @@ On Windows and Linux always returns
* `opacity` Number - between 0.0 (fully transparent) and 1.0 (fully opaque)
Sets the opacity of the window. On Linux does nothing.
Sets the opacity of the window. On Linux, does nothing. Out of bound number
values are clamped to the [0, 1] range.
#### `win.getOpacity()` _Windows_ _macOS_
#### `win.getOpacity()`
Returns `Number` - between 0.0 (fully transparent) and 1.0 (fully opaque)
Returns `Number` - between 0.0 (fully transparent) and 1.0 (fully opaque). On
Linux, always returns 1.
#### `win.setShape(rects)` _Windows_ _Linux_ _Experimental_