docs: Explain how to use highlightMode with BrowserWindow
As discussed on https://github.com/electron/electron/pull/6620
This commit is contained in:
parent
367f94aa76
commit
4823b5582f
1 changed files with 13 additions and 0 deletions
|
@ -193,6 +193,19 @@ Sets the title displayed aside of the tray icon in the status bar.
|
|||
|
||||
Sets when the tray's icon background becomes highlighted (in blue).
|
||||
|
||||
**Note:** You can use `highlightMode` with a [`BrowserWindow`](browser-window.md)
|
||||
by toggling between `'never'` and `'always'` modes when the window visibility
|
||||
changes.
|
||||
|
||||
```js
|
||||
win.on('show', () => {
|
||||
tray.setHighlightMode('always')
|
||||
})
|
||||
win.on('hide', () => {
|
||||
tray.setHighlightMode('never')
|
||||
})
|
||||
```
|
||||
|
||||
#### `tray.displayBalloon(options)` _Windows_
|
||||
|
||||
* `options` Object
|
||||
|
|
Loading…
Reference in a new issue