mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:30:53 +00:00
* Source/NSButtonCell.m (-setTitle:, -setAttributedTitle:,
-setAlternateImage:, -setImagePosition:): Update the control to reflect the changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33350 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6d4c7629e9
commit
f41b5fd58c
2 changed files with 38 additions and 0 deletions
|
@ -339,6 +339,14 @@ typedef struct _GSButtonCellFlags
|
|||
{
|
||||
ASSIGNCOPY(_contents, aString);
|
||||
_cell.contents_is_attributed_string = NO;
|
||||
|
||||
if (_control_view)
|
||||
{
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
{
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**<p>Sets the NSButtonCell's alternate title ( used when highlighted )
|
||||
|
@ -401,6 +409,14 @@ typedef struct _GSButtonCellFlags
|
|||
{
|
||||
ASSIGNCOPY(_contents, aString);
|
||||
_cell.contents_is_attributed_string = YES;
|
||||
|
||||
if (_control_view)
|
||||
{
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
{
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setTitleWithMnemonic:(NSString *)aString
|
||||
|
@ -469,6 +485,14 @@ typedef struct _GSButtonCellFlags
|
|||
- (void) setAlternateImage: (NSImage*)anImage
|
||||
{
|
||||
ASSIGN(_altImage, anImage);
|
||||
|
||||
if (_control_view)
|
||||
{
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
{
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**<p>Sets the image position. The GNUstep implementation depends only on
|
||||
|
@ -497,6 +521,14 @@ typedef struct _GSButtonCellFlags
|
|||
{
|
||||
_cell.type = NSImageCellType;
|
||||
}
|
||||
|
||||
if (_control_view)
|
||||
{
|
||||
if ([_control_view isKindOfClass: [NSControl class]])
|
||||
{
|
||||
[(NSControl*)_control_view updateCell: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**<p>Gets the NSButtonCell's <var>delay</var> and the <var>interval</var>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue