mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Add macOS specific speaking roles for MenuItem
This commit is contained in:
@@ -63,6 +63,8 @@ On macOS `role` can also have following additional values:
|
||||
* `hide` - Map to the `hide` action
|
||||
* `hideothers` - Map to the `hideOtherApplications` action
|
||||
* `unhide` - Map to the `unhideAllApplications` action
|
||||
* `startspeaking` - Map to the `startSpeaking` action
|
||||
* `stopspeaking` - Map to the `stopSpeaking` action
|
||||
* `front` - Map to the `arrangeInFront` action
|
||||
* `zoom` - Map to the `performZoom` action
|
||||
* `window` - The submenu is a "Window" menu
|
||||
|
||||
@@ -133,6 +133,23 @@ if (process.platform === 'darwin') {
|
||||
}
|
||||
]
|
||||
})
|
||||
// Edit menu.
|
||||
template[1].submenu.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Speech',
|
||||
submenu: [
|
||||
{
|
||||
role: 'startspeaking'
|
||||
},
|
||||
{
|
||||
role: 'stopspeaking'
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
// Window menu.
|
||||
template[3].submenu = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user