* Source/NSTableView.m (-setFrame:,-setFrameSize:): Use

documentVisibleRect. Shrink if table is larger than needed height.
        fixes bug #18117.
        (-drawBackgroundInClipRect:): Draw the background.
        * Source/NSClipView.m (-documentVisibleRect:): Return the clip views
        visible rect converted to the document views coordinate system.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23972 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ratmice 2006-10-27 17:48:54 +00:00
parent 51474ab2d9
commit 9317defea6
3 changed files with 33 additions and 26 deletions

View file

@ -462,26 +462,17 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
return rect;
}
/**<p>Returns the document visible rectangle. Returns NSZeroRect if the
document view does not exists.</p>
/**<p>Returns the document visible rectangle in the document views coordinate
* system.
<p>See Also: -documentRect [NSView-convertRect:toView:]</p>
*/
- (NSRect) documentVisibleRect
{
NSRect documentBounds;
NSRect clipViewBounds;
NSRect rect;
if (_documentView == nil)
{
return NSZeroRect;
}
documentBounds = [_documentView bounds];
clipViewBounds = [self convertRect: _bounds toView: _documentView];
rect = NSIntersectionRect (documentBounds, clipViewBounds);
return rect;
NSRect visRect;
visRect = [self visibleRect];
visRect = [self convertRect:visRect toView:_documentView];
return visRect;
}
- (void) drawRect: (NSRect)rect