docs: Explain how to use highlightMode with BrowserWindow

As discussed on https://github.com/electron/electron/pull/6620
This commit is contained in:
Dave Jeffery 2016-07-27 21:35:13 +01:00 committed by GitHub
parent 367f94aa76
commit 4823b5582f

View file

@ -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