docs: Recommend to use ICO icon
This commit is contained in:
parent
d26480b74e
commit
b33c04d041
3 changed files with 10 additions and 3 deletions
|
@ -65,8 +65,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||||
`false`.
|
`false`.
|
||||||
* `kiosk` Boolean - The kiosk mode. Default is `false`.
|
* `kiosk` Boolean - The kiosk mode. Default is `false`.
|
||||||
* `title` String - Default window title. Default is `"Electron"`.
|
* `title` String - Default window title. Default is `"Electron"`.
|
||||||
* `icon` [NativeImage](native-image.md) - The window icon, when omitted on
|
* `icon` [NativeImage](native-image.md) - The window icon. On Windows it is
|
||||||
Windows the executable's icon would be used as window icon.
|
recommended to use `ICO` icons to get best visual effects, you can also
|
||||||
|
leave it undefined so the executable's icon will be used.
|
||||||
* `show` Boolean - Whether window should be shown when created. Default is
|
* `show` Boolean - Whether window should be shown when created. Default is
|
||||||
`true`.
|
`true`.
|
||||||
* `frame` Boolean - Specify `false` to create a
|
* `frame` Boolean - Specify `false` to create a
|
||||||
|
|
|
@ -25,7 +25,12 @@ const appIcon = new Tray(image);
|
||||||
Currently `PNG` and `JPEG` image formats are supported. `PNG` is recommended
|
Currently `PNG` and `JPEG` image formats are supported. `PNG` is recommended
|
||||||
because of its support for transparency and lossless compression.
|
because of its support for transparency and lossless compression.
|
||||||
|
|
||||||
On Windows, you can also load an `ICO` icon from a file path.
|
On Windows, you can also load `ICO` icons from file paths, to get best visual
|
||||||
|
effects it is recommended to include at least followings sizes in the icon:
|
||||||
|
|
||||||
|
* 16x16
|
||||||
|
* 32x32
|
||||||
|
* 256x256
|
||||||
|
|
||||||
## High Resolution Image
|
## High Resolution Image
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ __Platform limitations:__
|
||||||
* When app indicator is used on Linux, the `click` event is ignored.
|
* When app indicator is used on Linux, the `click` event is ignored.
|
||||||
* On Linux in order for changes made to individual `MenuItem`s to take effect,
|
* On Linux in order for changes made to individual `MenuItem`s to take effect,
|
||||||
you have to call `setContextMenu` again. For example:
|
you have to call `setContextMenu` again. For example:
|
||||||
|
* On Windows it is recommended to use `ICO` icons to get best visual effects.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
contextMenu.items[2].checked = false;
|
contextMenu.items[2].checked = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue