mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Source/NSOutlineView.m: Handle rowAtPoint: returning -1.
* Source/NSTableView.m (drawRect:): Only call -highlightSelectionInClipRect: and -drawGridInClipRect: once. (-drawGridInClipRect:): Constrain the vertical grid line to the last row drawn in the rect. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24071 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
86c8735342
commit
84a0a59321
3 changed files with 14 additions and 25 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-11-10 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Source/NSOutlineView.m: Handle rowAtPoint: returning -1.
|
||||
* Source/NSTableView.m (drawRect:): Only call
|
||||
-highlightSelectionInClipRect: and -drawGridInClipRect: once.
|
||||
(-drawGridInClipRect:): Constrain the vertical grid line to the last row
|
||||
drawn in the rect.
|
||||
|
||||
2006-11-10 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Source/NSTableView.m (rowAtPoint:): Return -1 if the point is under
|
||||
|
|
|
@ -832,7 +832,8 @@ static NSImage *unexpandable = nil;
|
|||
_clickedRow = [self rowAtPoint: location];
|
||||
_clickedColumn = [self columnAtPoint: location];
|
||||
|
||||
if ([_tableColumns objectAtIndex: _clickedColumn] == _outlineTableColumn)
|
||||
if (_clickedRow != -1
|
||||
&& [_tableColumns objectAtIndex: _clickedColumn] == _outlineTableColumn)
|
||||
{
|
||||
NSImage *image;
|
||||
|
||||
|
|
|
@ -4964,6 +4964,7 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
|
||||
if (_numberOfColumns > 0)
|
||||
{
|
||||
int lastRowPosition = position - _rowHeight;
|
||||
/* Draw vertical lines */
|
||||
if (startingColumn == -1)
|
||||
startingColumn = 0;
|
||||
|
@ -4973,7 +4974,7 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
for (i = startingColumn; i <= endingColumn; i++)
|
||||
{
|
||||
DPSmoveto (ctxt, _columnOrigins[i], minY);
|
||||
DPSlineto (ctxt, _columnOrigins[i], maxY);
|
||||
DPSlineto (ctxt, _columnOrigins[i], lastRowPosition);
|
||||
DPSstroke (ctxt);
|
||||
}
|
||||
position = _columnOrigins[endingColumn];
|
||||
|
@ -4982,7 +4983,7 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
if (endingColumn == (_numberOfColumns - 1))
|
||||
position -= 1;
|
||||
DPSmoveto (ctxt, position, minY);
|
||||
DPSlineto (ctxt, position, maxY);
|
||||
DPSlineto (ctxt, position, lastRowPosition);
|
||||
DPSstroke (ctxt);
|
||||
}
|
||||
|
||||
|
@ -5072,7 +5073,7 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
}
|
||||
|
||||
/* Draw selection */
|
||||
// [self highlightSelectionInClipRect: aRect];
|
||||
[self highlightSelectionInClipRect: aRect];
|
||||
|
||||
/* Draw grid */
|
||||
if (_drawsGrid)
|
||||
|
@ -5098,31 +5099,10 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
SEL sel = @selector(drawRow:clipRect:);
|
||||
IMP imp = [self methodForSelector: sel];
|
||||
|
||||
NSRect localBackground;
|
||||
localBackground = aRect;
|
||||
localBackground.size.height = _rowHeight;
|
||||
localBackground.origin.y = _bounds.origin.y + (_rowHeight * startingRow);
|
||||
|
||||
for (i = startingRow; i <= endingRow; i++)
|
||||
{
|
||||
[_backgroundColor set];
|
||||
NSRectFill (localBackground);
|
||||
[self highlightSelectionInClipRect: localBackground];
|
||||
if (_drawsGrid)
|
||||
{
|
||||
[self drawGridInClipRect: localBackground];
|
||||
}
|
||||
localBackground.origin.y += _rowHeight;
|
||||
(*imp)(self, sel, i, aRect);
|
||||
}
|
||||
|
||||
if (NSMaxY(aRect) > NSMaxY(localBackground) - _rowHeight)
|
||||
{
|
||||
[_backgroundColor set];
|
||||
localBackground.size.height =
|
||||
aRect.size.height - aRect.origin.y + localBackground.origin.y;
|
||||
NSRectFill (localBackground);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue