[haiku-commits] Re: r35739 - haiku/trunk/src/kits/interface

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 03 Mar 2010 22:24:41 +0100

On 2010-03-03 at 18:43:31 [+0100], superstippi@xxxxxx wrote:
> Author: stippi
> Date: 2010-03-03 18:43:31 +0100 (Wed, 03 Mar 2010)
> New Revision: 35739
> Changeset: http://dev.haiku-os.org/changeset/35739/haiku
> 
> Modified:
>    haiku/trunk/src/kits/interface/Menu.cpp
>    haiku/trunk/src/kits/interface/MenuBar.cpp
>    haiku/trunk/src/kits/interface/MenuItem.cpp
> Log:
> Patch in part by "yourpalal":
>  * Set the MENU_STATE_CLOSED state upon BMenu initialization.
>  * When drawing the label, use the parent bounds, including
>    item margins to truncate the label, when the parent menu is
>    closed.
> 
> Thanks a lot for the patch!
> 
> Changes by myself:
>  * Cache the MenuPrivate instance in BMenuItem::DrawContent().
>  * Use Window()->UpdateIfNeeded() to animate the flashing invoked menu item,
>    which makes a lot more sense, the comment about it working in BeOS is
>    probably due to item->Select() probably drawing outside of an update 
>    cycle.
>  * The trigger invokation in keyboard handling didn't break out of the loop
>    after invoking an item. Probably didn't matter since triggers are 
>    hopefully
>    not assigned to more than one menu item. :-)
>  * Use the same trick as BMenuBar to avoid interfering with keyboard 
>  navigation
>    in the BMenu::_Track() hook.

Menu with submenus behave incorrectly now. When moving the mouse over the 
menu item, the submenu doesn't open. Only after moving the mouse a bit more 
the submenu opens.

CU, Ingo

Other related posts: