mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-10 21:06:33 +00:00
Disabled MenuItem
roles
on macOS.
Closes #969 Upstream-ref: eclipse-theia/theia#11217 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
a54d7c8f45
commit
0f8a29a493
@ -8,6 +8,7 @@ import {
|
|||||||
} from '@theia/core/lib/common/menu';
|
} from '@theia/core/lib/common/menu';
|
||||||
import {
|
import {
|
||||||
ElectronMainMenuFactory as TheiaElectronMainMenuFactory,
|
ElectronMainMenuFactory as TheiaElectronMainMenuFactory,
|
||||||
|
ElectronMenuItemRole,
|
||||||
ElectronMenuOptions,
|
ElectronMenuOptions,
|
||||||
} from '@theia/core/lib/electron-browser/menu/electron-main-menu-factory';
|
} from '@theia/core/lib/electron-browser/menu/electron-main-menu-factory';
|
||||||
import {
|
import {
|
||||||
@ -123,6 +124,15 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory {
|
|||||||
return { label, submenu };
|
return { label, submenu };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
protected override roleFor(id: string): ElectronMenuItemRole | undefined {
|
||||||
|
// MenuItem `roles` are completely broken on macOS:
|
||||||
|
// - https://github.com/eclipse-theia/theia/issues/11217,
|
||||||
|
// - https://github.com/arduino/arduino-ide/issues/969
|
||||||
|
// IDE2 uses commands instead.
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
protected override handleElectronDefault(
|
protected override handleElectronDefault(
|
||||||
menuNode: CompositeMenuNode,
|
menuNode: CompositeMenuNode,
|
||||||
args: any[] = [],
|
args: any[] = [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user