Merge remote-tracking branch 'upstream/master' into speedup-gpu

This commit is contained in:
gellert 2016-08-02 14:59:03 +02:00
commit 8eed91d87a
79 changed files with 674 additions and 436 deletions

View file

@ -725,6 +725,12 @@ Hides the dock icon.
Shows the dock icon.
### `app.dock.isVisible()` _macOS_
Returns whether the dock icon is visible.
The `app.dock.show()` call is asynchronous so this method might not
return true immediately after that call.
### `app.dock.setMenu(menu)` _macOS_
* `menu` [Menu](menu.md)

View file

@ -31,15 +31,24 @@ Currently `PNG` and `JPEG` image formats are supported. `PNG` is recommended
because of its support for transparency and lossless compression.
On Windows, you can also load `ICO` icons from file paths. For best visual
quality it is recommended to include at least the following sizes in the icon:
quality it is recommended to include at least the following sizes in the:
* 16x16
* 32x32
* 40x40
* 48x48
* 64x64
* Small icon
* 16x16 (100% DPI scale)
* 20x20 (125% DPI scale)
* 24x24 (150% DPI scale)
* 32x32 (200% DPI scale)
* Large icon
* 32x32 (100% DPI scale)
* 40x40 (125% DPI scale)
* 48x48 (150% DPI scale)
* 64x64 (200% DPI scale)
* 256x256
Check the *Size requirements* section in [this article][icons].
[icons]:https://msdn.microsoft.com/en-us/library/windows/desktop/dn742485(v=vs.85).aspx
## High Resolution Image
On platforms that have high-DPI support such as Apple Retina displays, you can

View file

@ -651,6 +651,42 @@ Mute the audio on the current web page.
Returns whether this page has been muted.
#### `contents.setZoomFactor(factor)`
* `factor` Number - Zoom factor.
Changes the zoom factor to the specified factor. Zoom factor is
zoom percent divided by 100, so 300% = 3.0.
#### `contents.getZoomFactor(callback)`
* `callback` Function
Sends a request to get current zoom factor, the `callback` will be called with
`callback(zoomFactor)`.
#### `contents.setZoomLevel(level)`
* `level` Number - Zoom level
Changes the zoom level to the specified level. The original size is 0 and each
increment above or below represents zooming 20% larger or smaller to default
limits of 300% and 50% of original size, respectively.
#### `contents.getZoomLevel(callback)`
* `callback` Function
Sends a request to get current zoom level, the `callback` will be called with
`callback(zoomLevel)`.
#### `contents.setZoomLevelLimits(minimumLevel, maximumLevel)`
* `minimumLevel` Number
* `maximumLevel` Number
Sets the maximum and minimum zoom level.`
#### `contents.undo()`
Executes the editing command `undo` in web page.