mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 17:50:47 +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
|
@ -1,3 +1,8 @@
|
||||||
|
2006-03-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSMenuView.m: ([-rectOfItemAtIndex:]) remove unused code and
|
||||||
|
tidy a bit (problem pointed out by Matt Rice).
|
||||||
|
|
||||||
2006-03-19 Nicolas Roard <nicolas@roard.com>
|
2006-03-19 Nicolas Roard <nicolas@roard.com>
|
||||||
|
|
||||||
* Source/NSSliderCell.m:
|
* Source/NSSliderCell.m:
|
||||||
|
|
|
@ -882,15 +882,15 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
|
|
||||||
- (NSRect) rectOfItemAtIndex: (int)index
|
- (NSRect) rectOfItemAtIndex: (int)index
|
||||||
{
|
{
|
||||||
|
if (_needsSizing == YES)
|
||||||
|
{
|
||||||
|
[self sizeToFit];
|
||||||
|
}
|
||||||
|
|
||||||
if (_horizontal == YES)
|
if (_horizontal == YES)
|
||||||
{
|
{
|
||||||
GSCellRect aRect;
|
GSCellRect aRect;
|
||||||
|
|
||||||
if (_needsSizing == YES)
|
|
||||||
{
|
|
||||||
[self sizeToFit];
|
|
||||||
}
|
|
||||||
|
|
||||||
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
|
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
|
||||||
|
|
||||||
/* FIXME: handle vertical case? */
|
/* FIXME: handle vertical case? */
|
||||||
|
@ -901,25 +901,12 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
{
|
{
|
||||||
NSRect theRect;
|
NSRect theRect;
|
||||||
|
|
||||||
if (_needsSizing == YES)
|
|
||||||
{
|
|
||||||
[self sizeToFit];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fiddle with the origin so that the item rect is shifted 1 pixel over
|
/* 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.
|
* 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.y
|
theRect.origin.x = _leftBorderOffset;
|
||||||
= _cellSize.height * ([_itemCells count] - index - 1);
|
|
||||||
theRect.origin.x = _leftBorderOffset;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
theRect.origin.x = _cellSize.width * (index + 1);
|
|
||||||
theRect.origin.y = 0;
|
|
||||||
}
|
|
||||||
theRect.size = _cellSize;
|
theRect.size = _cellSize;
|
||||||
|
|
||||||
/* NOTE: This returns the correct NSRect for drawing cells, but nothing
|
/* NOTE: This returns the correct NSRect for drawing cells, but nothing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue