mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Fixed NSButtonCell -image returns nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20308 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a93430ad56
commit
9ffc576add
3 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-11-07 Quentin Mathe <qmathe@club-internet.fr>
|
||||
|
||||
* Source/NSCell.m (-type): Now returns NSNullCellType when the image
|
||||
value is nil and the cell type is NSImageCellType, in order to match the
|
||||
documented Cocoa behavior.
|
||||
* Source/NSButtonCell.m (-setImagePosition:): Finished to commit the
|
||||
patch (not fully applied) associated with the revision 1.90, the bug
|
||||
#10595 is now corrected.
|
||||
|
||||
2004-11-07 Quentin Mathe <qmathe@club-internet.fr>
|
||||
|
||||
* Source/NSWindow.m (-constrainFrameRect:toScreen:): Modified the method
|
||||
|
|
|
@ -371,6 +371,18 @@
|
|||
- (void) setImagePosition: (NSCellImagePosition)aPosition
|
||||
{
|
||||
_cell.image_position = aPosition;
|
||||
|
||||
// In the GNUstep NSButtonCell implementation, the cell type depends only on
|
||||
// the image position.
|
||||
|
||||
if (_cell.image_position == NSNoImage)
|
||||
{
|
||||
[super setType: NSTextCellType];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super setType: NSImageCellType];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1220,7 +1232,7 @@
|
|||
{
|
||||
[_sound play];
|
||||
}
|
||||
|
||||
|
||||
[super performClickWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
|
|
|
@ -567,6 +567,9 @@ static NSColor *shadowCol;
|
|||
|
||||
- (NSCellType) type
|
||||
{
|
||||
if (_cell.type == NSImageCellType && _cell_image == nil)
|
||||
return NSNullCellType;
|
||||
|
||||
return _cell.type;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue