* Headers/Additions/GNUstepGUI/GSTheme.h: Add image parameter,

* Source/GSThemeDrawing.m: Add image parameter.   Correctly
	handle disabled buttons.
	* Source/NSButtonCell.m: Change to use new signature.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28523 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2009-08-23 18:24:34 +00:00
parent e89b630802
commit e70f79fbf7
4 changed files with 21 additions and 12 deletions

View file

@ -544,21 +544,21 @@
PSstroke();
}
- (void) drawButtonCellImage: (NSButtonCell *) cell
withFrame: (NSRect) aRect
position: (NSPoint) position
- (void) drawImage: (NSImage *)image
inButtonCell: (NSButtonCell *) cell
withFrame: (NSRect) aRect
position: (NSPoint) position
{
NSImage *anImage = [cell image];
BOOL disabled = [cell isEnabled];
BOOL enabled = [cell isEnabled];
BOOL dims = [cell imageDimsWhenDisabled];
if (disabled && dims)
if (!enabled && dims)
{
[anImage dissolveToPoint: position fraction: 0.5];
[image dissolveToPoint: position fraction: 0.5];
}
else
{
[anImage compositeToPoint: position
[image compositeToPoint: position
operation: NSCompositeSourceOver];
}
}