mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:10:38 +00:00
Make pop up menus in Macintosh menu style behave more similar to OS X.
In particular, when the user clicks the button, the menu stays open until the next click. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
507a365344
commit
ffe89ad119
2 changed files with 16 additions and 1 deletions
|
@ -1465,7 +1465,15 @@ static NSMapTable *viewInfo = 0;
|
|||
eventMask |= NSLeftMouseDownMask;
|
||||
}
|
||||
|
||||
if ([self isHorizontal] == YES)
|
||||
/* We attempt to mimic Mac OS X behavior for pop up menus. If the user
|
||||
presses the mouse button over a pop up button and then drags the mouse
|
||||
over the menu, the is closed when the user releases the mouse. On the
|
||||
other hand, when the user clicks on the button and then moves the mouse
|
||||
the menu is closed upon the next mouse click. */
|
||||
if ([self isHorizontal] == YES ||
|
||||
([[self menu] _ownedByPopUp] == YES &&
|
||||
NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", self)
|
||||
== NSMacintoshInterfaceStyle))
|
||||
{
|
||||
/*
|
||||
* Ignore the first mouse up if nothing interesting has happened.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue