mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:10:36 +00:00
Menu location fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12205 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0bf0bb42eb
commit
7e2a5ba8eb
4 changed files with 46 additions and 10 deletions
|
@ -608,6 +608,10 @@
|
|||
[self setNeedsDisplayInRect: aRect];
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the correct frame origin for aSubmenu based on the location
|
||||
of the receiver. This location may depend on the current NSInterfaceStyle.
|
||||
*/
|
||||
- (NSPoint) locationForSubmenu: (NSMenu *)aSubmenu
|
||||
{
|
||||
NSRect frame = [_window frame];
|
||||
|
@ -621,7 +625,6 @@
|
|||
else
|
||||
submenuFrame = NSZeroRect;
|
||||
|
||||
// FIXME: Fix this to support styles when the menus move.
|
||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)
|
||||
== GSWindowMakerInterfaceStyle)
|
||||
{
|
||||
|
@ -632,7 +635,8 @@
|
|||
aRect.origin.y)];
|
||||
|
||||
return NSMakePoint (frame.origin.x + frame.size.width,
|
||||
subOrigin.y - (submenuFrame.size.height - 43));
|
||||
subOrigin.y - (submenuFrame.size.height + 3 -
|
||||
2*[NSMenuView menuBarHeight]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue