mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 05:10:47 +00:00
fix problems with overlaps between toolbars, window contents, and in-window menus
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30206 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa0ce37f5d
commit
34f7052ac2
3 changed files with 14 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-04-20 Doug Simons <doug.simons@testplant.com>
|
||||||
|
|
||||||
|
* Source/NSWindow.m:
|
||||||
|
* Source/GSWindowDecorationView.m:
|
||||||
|
Fix problems with in-window menus sometimes overlapping toolbars or
|
||||||
|
toolbars overlapping window contents.
|
||||||
|
|
||||||
2010-04-19 Doug Simons <doug.simons@testplant.com>
|
2010-04-19 Doug Simons <doug.simons@testplant.com>
|
||||||
|
|
||||||
* Source/NSMatrix.m:
|
* Source/NSMatrix.m:
|
||||||
|
|
|
@ -213,17 +213,9 @@
|
||||||
|
|
||||||
- (void) setContentView: (NSView *)contentView
|
- (void) setContentView: (NSView *)contentView
|
||||||
{
|
{
|
||||||
NSSize oldSize;
|
|
||||||
|
|
||||||
[contentView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
[contentView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||||
[self addSubview: contentView];
|
[self addSubview: contentView];
|
||||||
|
[self layout];
|
||||||
oldSize = [contentView frame].size;
|
|
||||||
oldSize.width += _frame.size.width - contentRect.size.width;
|
|
||||||
oldSize.height += _frame.size.height - contentRect.size.height;
|
|
||||||
[contentView resizeWithOldSuperviewSize: oldSize];
|
|
||||||
[contentView setFrameOrigin: NSMakePoint(contentRect.origin.x,
|
|
||||||
contentRect.origin.y)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setDocumentEdited: (BOOL)flag
|
- (void) setDocumentEdited: (BOOL)flag
|
||||||
|
@ -239,6 +231,7 @@
|
||||||
NSRect contentViewFrame;
|
NSRect contentViewFrame;
|
||||||
NSToolbar *tb = [_window toolbar];
|
NSToolbar *tb = [_window toolbar];
|
||||||
NSRect frame = [window frame];
|
NSRect frame = [window frame];
|
||||||
|
NSView *windowContentView = [_window contentView];
|
||||||
|
|
||||||
frame.origin = NSZeroPoint;
|
frame.origin = NSZeroPoint;
|
||||||
contentViewFrame = [isa contentRectForFrameRect: frame
|
contentViewFrame = [isa contentRectForFrameRect: frame
|
||||||
|
@ -282,6 +275,10 @@
|
||||||
contentViewFrame.size.height -= newToolbarViewHeight;
|
contentViewFrame.size.height -= newToolbarViewHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ([windowContentView superview] == self)
|
||||||
|
{
|
||||||
|
[windowContentView setFrame:contentViewFrame];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) changeWindowHeight: (float)difference
|
- (void) changeWindowHeight: (float)difference
|
||||||
|
@ -307,6 +304,7 @@
|
||||||
|
|
||||||
// then resize the window
|
// then resize the window
|
||||||
[window setFrame: windowFrame display: YES];
|
[window setFrame: windowFrame display: YES];
|
||||||
|
[self layout];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1816,12 +1816,6 @@ many times.
|
||||||
{
|
{
|
||||||
[_wv setInputState: GSTitleBarNormal];
|
[_wv setInputState: GSTitleBarNormal];
|
||||||
}
|
}
|
||||||
if ([self menu] == [NSApp mainMenu])
|
|
||||||
{
|
|
||||||
/* This window contains the main menu ... remove it.
|
|
||||||
*/
|
|
||||||
[self setMenu: nil];
|
|
||||||
}
|
|
||||||
[nc postNotificationName: NSWindowDidResignMainNotification object: self];
|
[nc postNotificationName: NSWindowDidResignMainNotification object: self];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue