mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 06:30:47 +00:00
Merge original in-window menu branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
92b44ffa68
commit
0de761d88e
4 changed files with 58 additions and 49 deletions
|
@ -294,7 +294,7 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
|
||||
if (hasMenu)
|
||||
{
|
||||
NSMenuView *menuView;
|
||||
NSMenuView *menuView = nil;
|
||||
GSTheme *theme = [GSTheme theme];
|
||||
float menuBarHeight = [theme menuHeightForWindow: _window];
|
||||
NSRect menuRect =
|
||||
|
@ -302,8 +302,17 @@ static inline NSRect RectWithSizeScaledByFactor(NSRect aRect, CGFloat factor)
|
|||
(NSMaxY(contentRect) + 1) - menuBarHeight,
|
||||
contentViewFrame.size.width,
|
||||
menuBarHeight);
|
||||
|
||||
menuView = [[_window menu] menuRepresentation];
|
||||
NSEnumerator *e = [[self subviews] objectEnumerator];
|
||||
NSView *v;
|
||||
|
||||
while ((v = [e nextObject]) != nil)
|
||||
{
|
||||
if ([v isKindOfClass: [NSMenuView class]] == YES)
|
||||
{
|
||||
menuView = (NSMenuView *)v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[menuView setFrame: menuRect];
|
||||
contentViewFrame.size.height -= menuBarHeight;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue