mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +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
6573b6c50f
commit
384da96300
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>
|
2009-04-10 00:53-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSMenuView.m: In the method
|
* Source/NSMenuView.m: In the method
|
||||||
|
|
|
@ -1154,28 +1154,31 @@ static NSMapTable *viewInfo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update position, if needed, using the preferredEdge
|
// Update position, if needed, using the preferredEdge
|
||||||
if([_attachedMenu _ownedByPopUp])
|
if ([_attachedMenu _ownedByPopUp])
|
||||||
{
|
{
|
||||||
// Per Cocoa documentation, the selected cell should always show up
|
// Per Cocoa documentation, the selected cell should always show up
|
||||||
// over the button for popups. For pull down menus, the preferred
|
// over the button for popups. For pull down menus, the preferred
|
||||||
// edge is relevant. This is also apparent from testing under Cocoa.
|
// 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 (edge == NSMaxYEdge)
|
||||||
if ([_attachedMenu _ownedByPopUp] &&
|
|
||||||
([[_attachedMenu _owningPopUp] pullsDown]))
|
|
||||||
{
|
{
|
||||||
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;
|
screenFrame.origin.x += screenRect.size.width;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue