mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 04:10:38 +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
|
@ -213,17 +213,9 @@
|
|||
|
||||
- (void) setContentView: (NSView *)contentView
|
||||
{
|
||||
NSSize oldSize;
|
||||
|
||||
[contentView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||
[self addSubview: contentView];
|
||||
|
||||
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)];
|
||||
[self layout];
|
||||
}
|
||||
|
||||
- (void) setDocumentEdited: (BOOL)flag
|
||||
|
@ -239,6 +231,7 @@
|
|||
NSRect contentViewFrame;
|
||||
NSToolbar *tb = [_window toolbar];
|
||||
NSRect frame = [window frame];
|
||||
NSView *windowContentView = [_window contentView];
|
||||
|
||||
frame.origin = NSZeroPoint;
|
||||
contentViewFrame = [isa contentRectForFrameRect: frame
|
||||
|
@ -282,6 +275,10 @@
|
|||
contentViewFrame.size.height -= newToolbarViewHeight;
|
||||
}
|
||||
}
|
||||
if ([windowContentView superview] == self)
|
||||
{
|
||||
[windowContentView setFrame:contentViewFrame];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) changeWindowHeight: (float)difference
|
||||
|
@ -307,6 +304,7 @@
|
|||
|
||||
// then resize the window
|
||||
[window setFrame: windowFrame display: YES];
|
||||
[self layout];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue