Use togglefullscreen role which is now part of electron
https://github.com/electron/electron/pull/6166
This commit is contained in:
@@ -115,20 +115,7 @@ var createTemplate = function(mainWindow, config) {
|
||||
}
|
||||
}
|
||||
}, {
|
||||
label: 'Toggle Full Screen',
|
||||
accelerator: (function() {
|
||||
if (process.platform === 'darwin') {
|
||||
return 'Ctrl+Command+F';
|
||||
}
|
||||
else {
|
||||
return 'F11';
|
||||
}
|
||||
})(),
|
||||
click: function(item, focusedWindow) {
|
||||
if (focusedWindow) {
|
||||
focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
|
||||
}
|
||||
}
|
||||
role: 'togglefullscreen'
|
||||
}, separatorItem, {
|
||||
label: 'Actual Size',
|
||||
accelerator: 'CmdOrCtrl+0',
|
||||
|
Reference in New Issue
Block a user