Minor menu drawing fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22731 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2006-03-31 11:14:38 +00:00
parent 40500b86a6
commit 7a08c78271
2 changed files with 10 additions and 3 deletions

View file

@ -901,14 +901,16 @@ _addLeftBorderOffsetToRect(NSRect aRect)
{
NSRect theRect;
/* 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.
*/
theRect.origin.y
= _cellSize.height * ([_itemCells count] - index - 1);
theRect.origin.x = _leftBorderOffset;
theRect.size = _cellSize;
/* 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.
*/
theRect.origin.x++;
/* NOTE: This returns the correct NSRect for drawing cells, but nothing
* else (unless we are a popup). This rect will have to be modified for
* event calculation, etc..