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',
|
role: 'togglefullscreen'
|
||||||
accelerator: (function() {
|
|
||||||
if (process.platform === 'darwin') {
|
|
||||||
return 'Ctrl+Command+F';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 'F11';
|
|
||||||
}
|
|
||||||
})(),
|
|
||||||
click: function(item, focusedWindow) {
|
|
||||||
if (focusedWindow) {
|
|
||||||
focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, separatorItem, {
|
}, separatorItem, {
|
||||||
label: 'Actual Size',
|
label: 'Actual Size',
|
||||||
accelerator: 'CmdOrCtrl+0',
|
accelerator: 'CmdOrCtrl+0',
|
||||||
|
Reference in New Issue
Block a user