mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:40:38 +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
|
@ -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…
Add table
Add a link
Reference in a new issue