mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:20:37 +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
1cea03788b
commit
a8988194dd
1 changed files with 10 additions and 6 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue