Fixed drawing of background color which had broken nextstep-like look&feel

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11898 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2001-12-25 14:07:25 +00:00
parent 1cea03788b
commit a8988194dd

View file

@ -614,14 +614,13 @@
else
mask = NSNoCellMask;
// pushed in buttons contents are displaced to the bottom right 1px
/* Pushed in buttons contents are displaced to the bottom right 1px. */
if (_cell.is_bordered && (mask & NSPushInCellMask))
{
cellFrame = NSOffsetRect(cellFrame, 1., flippedView ? 1. : -1.);
}
/*
// determine the background color
/* Determine the background color. */
if (mask & (NSChangeGrayCellMask | NSChangeBackgroundCellMask))
{
backgroundColor = [NSColor selectedControlColor];
@ -630,10 +629,10 @@
if (backgroundColor == nil)
backgroundColor = [NSColor controlBackgroundColor];
// set cell's background color
/* Draw the cell's background color. We always draw the background,
as required by our nextstep-like look and feel. */
[backgroundColor set];
NSRectFill(cellFrame);
*/
NSRectFill (cellFrame);
/*
* Determine the image and the title that will be
@ -659,6 +658,11 @@
if (imageToDisplay)
{
/* FIXME - the following is a hack! Because we don't seem to be
getting alpha composing of images right, we use this hack of
hard-setting manually the background color of the image to
the wanted background color ... this should go away when
alpha composing of images works 100%. */
[imageToDisplay setBackgroundColor: backgroundColor];
imageSize = [imageToDisplay size];
}