mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:50:37 +00:00
Lots of fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4844 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
186d117c16
commit
9870f513bc
12 changed files with 352 additions and 214 deletions
|
@ -489,14 +489,17 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
|
|||
{
|
||||
NSRect frame;
|
||||
NSRect submenuFrame;
|
||||
NSWindow *win_link;
|
||||
|
||||
if (![self isFollowTransient])
|
||||
{
|
||||
frame = [aWindow frame];
|
||||
win_link = aWindow;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = [bWindow frame];
|
||||
win_link = bWindow;
|
||||
}
|
||||
|
||||
if (aSubmenu)
|
||||
|
@ -506,9 +509,20 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
|
|||
else
|
||||
submenuFrame = NSZeroRect;
|
||||
|
||||
return NSMakePoint (frame.origin.x + frame.size.width + 1,
|
||||
frame.origin.y + frame.size.height
|
||||
- submenuFrame.size.height);
|
||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil) == GSWindowMakerInterfaceStyle)
|
||||
{
|
||||
NSRect aRect = [menu_view rectOfItemAtIndex:[self indexOfItemWithTitle:[aSubmenu title]]];
|
||||
NSPoint subOrigin = [win_link convertBaseToScreen: NSMakePoint(aRect.origin.x, aRect.origin.y)];
|
||||
|
||||
return NSMakePoint (frame.origin.x + frame.size.width + 1,
|
||||
subOrigin.y - (submenuFrame.size.height - 41));
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSMakePoint (frame.origin.x + frame.size.width + 1,
|
||||
frame.origin.y + frame.size.height
|
||||
- submenuFrame.size.height);
|
||||
}
|
||||
}
|
||||
|
||||
- (NSMenu *) supermenu
|
||||
|
@ -837,6 +851,12 @@ NSArray* array;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) _rightMouseDisplay
|
||||
{
|
||||
// TODO: implement this method
|
||||
;
|
||||
}
|
||||
|
||||
- (void) display
|
||||
{
|
||||
if (menu_changed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue