picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.52k stars 319 forks source link

Mac: Fix disabled menu items with a Dialog #2653

Closed cwensley closed 1 month ago

cwensley commented 1 month ago

On Mac, if you define a Menu on a Dialog all of its items (except system items) end up being disabled without having to add a native style to set MenuItemHandler.EnabledWhenModal to true.

Now when you define a menu for a Dialog, and it is the current dialog, all of those items will be enabled.

Also, macOS now creates a blank menu on startup instead of leaving it null, so we now ensure we don't remember that so other dialogs/forms don't get a completely blank menu.