input: border fix when in strip/panel

This commit is contained in:
jean-emmanuel 2017-07-25 12:25:03 +02:00
parent 90f96c1e1b
commit 6b13d74971
2 changed files with 28 additions and 2 deletions

View file

@ -1,5 +1,7 @@
var {app, dialog} = require('electron'),
settings = require('./settings')
var {app, dialog, Tray, Menu} = require('electron'),
settings = require('./settings'),
path = require('path'),
tray
dialog.showErrorBox = function(title,err) {
console.log(title + ': ' + err)
@ -19,4 +21,19 @@ app.on('window-all-closed', function() {
}
})
app.on('ready', () => {
tray = new Tray(path.resolve(__dirname + '/../../resources/images/logo.png'))
const contextMenu = Menu.buildFromTemplate([
{label: 'New client window', type: 'normal'},
{label: 'Item2', type: 'radio'}
])
// Make a change to the context menu
contextMenu.items[1].checked = false
tray.setToolTip(settings.read('appName'))
// Call this again for Linux because we modified the context menu
tray.setContextMenu(contextMenu)
})
module.exports = app