Fix suggested by Benhur

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4191 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-05-03 17:31:11 +00:00
parent a62024735b
commit 198f9549f5
2 changed files with 17 additions and 1 deletions

View file

@ -386,6 +386,10 @@
// Save last view drawn to
[self setControlView: controlView];
// transparent buttons never draw
if ([self isTransparent])
return;
// do nothing if cell's frame rect is zero
if (NSIsEmptyRect(cellFrame))
return;
@ -414,7 +418,11 @@
NSString *titleToDisplay;
NSSize imageSize = {0, 0};
NSRect rect;
NSColor *backgroundColor = [NSColor controlBackgroundColor];
NSColor *backgroundColor = nil;
// transparent buttons never draw
if ([self isTransparent])
return;
cellFrame = NSInsetRect(cellFrame, xDist, yDist);
@ -433,6 +441,9 @@
backgroundColor = [NSColor selectedControlColor];
}
if (backgroundColor == nil)
backgroundColor = [NSColor controlBackgroundColor];
// set cell's background color
[backgroundColor set];
NSRectFill(cellFrame);