mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
macOS convention puts About / Check for Updates under the bold app- named menu next to the Apple logo, not under a separate top-level Help menu. Add a PromoteHelpToMacAppMenu pass that runs only on macOS: 1. Find the _Help submenu in topLevelByTag (populated by AppendRegistryCommands when it sees the Help-targeted MEF commands). 2. Move its children into a new NativeMenu and SetMenu it on Application.Current. Avalonia's Cocoa exporter watches NativeMenu.MenuProperty on the Application as the channel for the bold app menu, and our items get prepended above its auto-inserted Services / Hide / Quit block. 3. Remove _Help from the window menu so the items don't appear twice. On Windows / Linux the gate skips and the _Help top-level renders inline as before. The CheckForUpdatesCommand / AboutCommand attributes still declare ParentMenuID = _Help -- they remain Help-categorised in metadata, just re-routed at attachment time on macOS. No special Cocoa metadata needed; the exporter picks up plain NativeMenuItems. Assisted-by: Claude:claude-opus-4-7:Claude Codepull/3755/head
1 changed files with 27 additions and 0 deletions
Loading…
Reference in new issue