Create a new GSTheme method for drawing the background of NSMenuView,

-drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29430 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2010-01-28 04:28:23 +00:00
parent 0614c779b0
commit 775d9caf51
4 changed files with 40 additions and 16 deletions

View file

@ -1223,23 +1223,12 @@ static NSMapTable *viewInfo = 0;
{
int i;
int howMany = [_itemCells count];
NSRectEdge sides[2];
float grays[] = {NSDarkGray, NSDarkGray};
if (_horizontal == YES)
{
sides[0] = NSMinYEdge;
sides[1] = NSMinYEdge;
NSDrawTiledRects(_bounds, rect, sides, grays, 2);
}
else
{
sides[0] = NSMinXEdge;
sides[1] = NSMaxYEdge;
// Draw the dark gray upper left lines.
NSDrawTiledRects(_bounds, rect, sides, grays, 2);
}
[[GSTheme theme] drawBackgroundForMenuView: self
withFrame: _bounds
dirtyRect: rect
horizontal: _horizontal];
// Draw the menu cells.
for (i = 0; i < howMany; i++)
{