mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 11:30:48 +00:00
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:
parent
b3ef3c0cbc
commit
57ea7f8bf1
1 changed files with 10 additions and 6 deletions
|
@ -614,14 +614,13 @@
|
||||||
else
|
else
|
||||||
mask = NSNoCellMask;
|
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))
|
if (_cell.is_bordered && (mask & NSPushInCellMask))
|
||||||
{
|
{
|
||||||
cellFrame = NSOffsetRect(cellFrame, 1., flippedView ? 1. : -1.);
|
cellFrame = NSOffsetRect(cellFrame, 1., flippedView ? 1. : -1.);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Determine the background color. */
|
||||||
// determine the background color
|
|
||||||
if (mask & (NSChangeGrayCellMask | NSChangeBackgroundCellMask))
|
if (mask & (NSChangeGrayCellMask | NSChangeBackgroundCellMask))
|
||||||
{
|
{
|
||||||
backgroundColor = [NSColor selectedControlColor];
|
backgroundColor = [NSColor selectedControlColor];
|
||||||
|
@ -630,10 +629,10 @@
|
||||||
if (backgroundColor == nil)
|
if (backgroundColor == nil)
|
||||||
backgroundColor = [NSColor controlBackgroundColor];
|
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];
|
[backgroundColor set];
|
||||||
NSRectFill(cellFrame);
|
NSRectFill (cellFrame);
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the image and the title that will be
|
* Determine the image and the title that will be
|
||||||
|
@ -659,6 +658,11 @@
|
||||||
|
|
||||||
if (imageToDisplay)
|
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];
|
[imageToDisplay setBackgroundColor: backgroundColor];
|
||||||
imageSize = [imageToDisplay size];
|
imageSize = [imageToDisplay size];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue