Submenus now expand even if all items are disabled

As stated in the Apple HIG[1] (via JMarc):

  Ensure that a submenu’s title is undimmed even when all its commands
  are unavailable. As with menu titles, it’s important for users to be
  able to view a submenu’s contents, even if none of them are
  available in the current context.

[1]
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
This commit is contained in:
Scott Kostyshak 2014-02-21 10:26:36 -05:00
parent fb05011ad0
commit d449e7e64e

View File

@ -418,8 +418,7 @@ void MenuDefinition::addWithStatusCheck(MenuItem const & i)
// Only these kind of items affect the status of the submenu
if ((cit->kind() == MenuItem::Command
|| cit->kind() == MenuItem::Submenu
|| cit->kind() == MenuItem::Help)
&& cit->status().enabled()) {
|| cit->kind() == MenuItem::Help)) {
enabled = true;
break;
}