NSMenuView.m fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22822 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2006-04-25 22:58:13 +00:00
parent 93315b5129
commit 95a6ff2dfe
2 changed files with 11 additions and 16 deletions

View file

@ -1,3 +1,10 @@
2006-04-27 Sergii Stoian <stoyan255@yahoo.com>
* Source/NSMenuView.m (-rectOfItemAtIndex:): Delete origin.x fiddling
code because it's not correct. The code wich draws heavy line have to
update _leftBorderOffset instead.
(-drawRect:): Always draw dark gray upper and left border.
2006-04-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDocumentController.m (-makeUntitledDocumentOfType:):

View file

@ -906,11 +906,6 @@ _addLeftBorderOffsetToRect(NSRect aRect)
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..
@ -1096,17 +1091,10 @@ _addLeftBorderOffsetToRect(NSRect aRect)
}
else
{
if (![_attachedMenu _ownedByPopUp])
{
NSDrawButton (_bounds, rect);
}
else
{
sides[0] = NSMinXEdge;
sides[1] = NSMaxYEdge;
// Draw the dark gray upper left lines.
NSDrawTiledRects(_bounds, rect, sides, grays, 2);
}
sides[0] = NSMinXEdge;
sides[1] = NSMaxYEdge;
// Draw the dark gray upper left lines.
NSDrawTiledRects(_bounds, rect, sides, grays, 2);
}
// Draw the menu cells.