mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
2012-10-15 18:02-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSButtonCell.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35696 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce25719c03
commit
9cd6adf8a6
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-10-15 18:02-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSButtonCell.m: Implementation for change request
|
||||
bug#37233. Button should now show the return image "common_ret"
|
||||
and "common_retH" when return/enter is the key equivalent.
|
||||
|
||||
2012-10-14 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSThemeDrawing.m (-drawTabViewRect:...selectedItem:),
|
||||
|
|
|
@ -630,6 +630,20 @@ typedef struct _GSButtonCellFlags
|
|||
- (void) setKeyEquivalent: (NSString*)key
|
||||
{
|
||||
ASSIGNCOPY(_keyEquivalent, key);
|
||||
|
||||
if([self image] == nil && ([_keyEquivalent isEqualToString:@"\r"] ||
|
||||
[_keyEquivalent isEqualToString:@"\n"]))
|
||||
{
|
||||
[self setImagePosition: NSImageRight];
|
||||
[self setImage: [NSImage imageNamed:@"common_ret"]];
|
||||
[self setAlternateImage: [NSImage imageNamed:@"common_retH"]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setImagePosition: NSNoImage];
|
||||
[self setImage: nil];
|
||||
[self setAlternateImage: nil];
|
||||
}
|
||||
}
|
||||
|
||||
/** <p>Sets the modifier mask of the NSButtonCell's key equivalent to
|
||||
|
|
Loading…
Reference in a new issue