mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +00:00
tidy and remnove unused code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22690 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dd9e5d28a6
commit
bcf0a68ff2
2 changed files with 13 additions and 21 deletions
|
@ -882,15 +882,15 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
|
||||
- (NSRect) rectOfItemAtIndex: (int)index
|
||||
{
|
||||
if (_needsSizing == YES)
|
||||
{
|
||||
[self sizeToFit];
|
||||
}
|
||||
|
||||
if (_horizontal == YES)
|
||||
{
|
||||
GSCellRect aRect;
|
||||
|
||||
if (_needsSizing == YES)
|
||||
{
|
||||
[self sizeToFit];
|
||||
}
|
||||
|
||||
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
|
||||
|
||||
/* FIXME: handle vertical case? */
|
||||
|
@ -901,25 +901,12 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
{
|
||||
NSRect theRect;
|
||||
|
||||
if (_needsSizing == YES)
|
||||
{
|
||||
[self sizeToFit];
|
||||
}
|
||||
|
||||
/* Fiddle with the origin so that the item rect is shifted 1 pixel over
|
||||
* so we do not draw on the heavy line at origin.x = 0.
|
||||
*/
|
||||
if (_horizontal == NO)
|
||||
{
|
||||
theRect.origin.y
|
||||
= _cellSize.height * ([_itemCells count] - index - 1);
|
||||
theRect.origin.x = _leftBorderOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
theRect.origin.x = _cellSize.width * (index + 1);
|
||||
theRect.origin.y = 0;
|
||||
}
|
||||
theRect.origin.y
|
||||
= _cellSize.height * ([_itemCells count] - index - 1);
|
||||
theRect.origin.x = _leftBorderOffset;
|
||||
theRect.size = _cellSize;
|
||||
|
||||
/* NOTE: This returns the correct NSRect for drawing cells, but nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue