Fix tray and menu docs
This commit is contained in:
parent
63ebc41778
commit
11f8923c43
3 changed files with 6 additions and 4 deletions
|
@ -31,7 +31,7 @@ Create a new `MenuItem` with the following method:
|
||||||
* `visible` Boolean - (optional) If false, the menu item will be entirely hidden.
|
* `visible` Boolean - (optional) If false, the menu item will be entirely hidden.
|
||||||
* `checked` Boolean - (optional) Should only be specified for `checkbox` or `radio` type
|
* `checked` Boolean - (optional) Should only be specified for `checkbox` or `radio` type
|
||||||
menu items.
|
menu items.
|
||||||
* `submenu` Menu - (optional) Should be specified for `submenu` type menu items. If
|
* `submenu` MenuItemConstructorOptions[] - (optional) Should be specified for `submenu` type menu items. If
|
||||||
`submenu` is specified, the `type: 'submenu'` can be omitted. If the value
|
`submenu` is specified, the `type: 'submenu'` can be omitted. If the value
|
||||||
is not a `Menu` then it will be automatically converted to one using
|
is not a `Menu` then it will be automatically converted to one using
|
||||||
`Menu.buildFromTemplate`.
|
`Menu.buildFromTemplate`.
|
||||||
|
|
|
@ -238,7 +238,7 @@ will be set as each window's top menu.
|
||||||
|
|
||||||
#### `Menu.getApplicationMenu()`
|
#### `Menu.getApplicationMenu()`
|
||||||
|
|
||||||
Returns the application menu (an instance of `Menu`), if set, or `null`, if not set.
|
Returns `Menu` the application menu (an instance of `Menu`), if set, or `null`, if not set.
|
||||||
|
|
||||||
#### `Menu.sendActionToFirstResponder(action)` _macOS_
|
#### `Menu.sendActionToFirstResponder(action)` _macOS_
|
||||||
|
|
||||||
|
@ -253,7 +253,9 @@ for more information on macOS' native actions.
|
||||||
|
|
||||||
#### `Menu.buildFromTemplate(template)`
|
#### `Menu.buildFromTemplate(template)`
|
||||||
|
|
||||||
* `template` MenuItem[]
|
* `template` MenuItemConstructorOptions[]
|
||||||
|
|
||||||
|
Returns `Menu`
|
||||||
|
|
||||||
Generally, the `template` is just an array of `options` for constructing a
|
Generally, the `template` is just an array of `options` for constructing a
|
||||||
[MenuItem](menu-item.md). The usage can be referenced above.
|
[MenuItem](menu-item.md). The usage can be referenced above.
|
||||||
|
|
|
@ -57,7 +57,7 @@ rely on the `click` event and always attach a context menu to the tray icon.
|
||||||
|
|
||||||
### `new Tray(image)`
|
### `new Tray(image)`
|
||||||
|
|
||||||
* `image` [NativeImage](native-image.md)
|
* `image` ([NativeImage](native-image.md) | String)
|
||||||
|
|
||||||
Creates a new tray icon associated with the `image`.
|
Creates a new tray icon associated with the `image`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue