mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSMenuView.m: In the method
- (void) setWindowFrameForAttachingToRect:... test if the view is flipped and make the adjustment. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28190 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
59d5a9818b
commit
f5a5223ac1
2 changed files with 20 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-04-10 01:15-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSMenuView.m: In the method
|
||||
- (void) setWindowFrameForAttachingToRect:... test if the view
|
||||
is flipped and make the adjustment.
|
||||
|
||||
2009-04-10 00:53-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSMenuView.m: In the method
|
||||
|
|
|
@ -1154,28 +1154,31 @@ static NSMapTable *viewInfo = 0;
|
|||
}
|
||||
|
||||
// Update position, if needed, using the preferredEdge
|
||||
if([_attachedMenu _ownedByPopUp])
|
||||
if ([_attachedMenu _ownedByPopUp])
|
||||
{
|
||||
// Per Cocoa documentation, the selected cell should always show up
|
||||
// over the button for popups. For pull down menus, the preferred
|
||||
// edge is relevant. This is also apparent from testing under Cocoa.
|
||||
if([[_attachedMenu _owningPopUp] pullsDown])
|
||||
if ([[_attachedMenu _owningPopUp] pullsDown])
|
||||
{
|
||||
if (edge == NSMinYEdge)
|
||||
// Handle the Y edge...
|
||||
if ([[[_attachedMenu _owningPopUp] controlView] isFlipped])
|
||||
{
|
||||
/*
|
||||
if ([_attachedMenu _ownedByPopUp] &&
|
||||
([[_attachedMenu _owningPopUp] pullsDown]))
|
||||
if (edge == NSMaxYEdge)
|
||||
{
|
||||
screenFrame.origin.y -= screenRect.size.height;
|
||||
screenFrame.origin.y += screenRect.size.height;
|
||||
}
|
||||
*/
|
||||
}
|
||||
else if (edge == NSMaxYEdge)
|
||||
else
|
||||
{
|
||||
screenFrame.origin.y += screenRect.size.height;
|
||||
if (edge == NSMinYEdge)
|
||||
{
|
||||
screenFrame.origin.y += screenRect.size.height;
|
||||
}
|
||||
}
|
||||
else if (edge == NSMaxXEdge)
|
||||
|
||||
// Handle the X edge...
|
||||
if (edge == NSMaxXEdge)
|
||||
{
|
||||
screenFrame.origin.x += screenRect.size.width;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue