mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
Merge pull request #6012 from miniak/menu-item-roles
Document 'zoom' role + add missing menu items (Delete / Paste and Match Style / Zoom)
This commit is contained in:
@@ -66,6 +66,15 @@ const template = [
|
||||
accelerator: 'CmdOrCtrl+V',
|
||||
role: 'paste'
|
||||
},
|
||||
{
|
||||
label: 'Paste and Match Style',
|
||||
accelerator: 'Shift+Command+V',
|
||||
role: 'pasteandmatchstyle'
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
role: 'delete'
|
||||
},
|
||||
{
|
||||
label: 'Select All',
|
||||
accelerator: 'CmdOrCtrl+A',
|
||||
@@ -174,7 +183,21 @@ if (process.platform === 'darwin') {
|
||||
]
|
||||
});
|
||||
// Window menu.
|
||||
template[3].submenu.push(
|
||||
template[3].submenu = [
|
||||
{
|
||||
label: 'Close',
|
||||
accelerator: 'CmdOrCtrl+W',
|
||||
role: 'close'
|
||||
},
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'CmdOrCtrl+M',
|
||||
role: 'minimize'
|
||||
},
|
||||
{
|
||||
label: 'Zoom',
|
||||
role: 'zoom'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
@@ -182,7 +205,7 @@ if (process.platform === 'darwin') {
|
||||
label: 'Bring All to Front',
|
||||
role: 'front'
|
||||
}
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
|
||||
Reference in New Issue
Block a user