MacOS 14 now supports proper section headers in menus. It just looks a tiny bit nicer, than adding a normal one disabled (especially when items below that “section header” are also disabled).
Would be great if that could be incorporated into JUCE:
else if (i.isSectionHeader)
{
if (@available (macos 14.0, *))
{
[menuToAddTo addItem: [NSMenuItem sectionHeaderWithTitle: text]];
}
else
{
NSMenuItem* item = [menuToAddTo addItemWithTitle: text
action: nil
keyEquivalent: nsEmptyString()];
[item setEnabled: false];
}
}