Unhighlight menu items when the mouse leaves them

This commit is contained in:
David Capello 2015-07-29 11:42:57 -03:00
parent 45b9df78d6
commit de3d408581

View File

@ -702,6 +702,14 @@ bool MenuItem::onProcessMessage(Message* msg)
break;
case kMouseLeaveMessage:
// Unhighlight this item if its submenu isn't opened
if (isHighlighted() &&
!m_submenu_menubox &&
getParent() &&
getParent()->type() == kMenuWidget) {
static_cast<Menu*>(getParent())->unhighlightItem();
}
// TODO theme specific!!
invalidate();