Fix menuItem and popUpButton drawing issues from merge

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38852 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-08-03 20:18:58 +00:00
parent ddf97e6fba
commit e844e3909e
2 changed files with 8 additions and 1 deletions

View file

@ -184,6 +184,11 @@ static NSString *commandKeyString = @"#";
return color;
}
- (NSInteger) state
{
return [_menuItem state];
}
- (void) setMenuItem: (NSMenuItem *)item
{
ASSIGN(_menuItem, item);
@ -759,6 +764,7 @@ static NSString *commandKeyString = @"#";
// Testplant-MAL-2015-06-22: While merging found was [_menuItem state] but
// I think it should be using [self state] for popups to show properly...
// Added 'state' method to NSMenuItemCell to return [_menuItem state] value...
switch ([self state])
{
case NSOnState:

View file

@ -1081,6 +1081,7 @@ static NSImage *_pbc_image[5];
[self attachPopUpWithFrame: frame inView: controlView];
}
#if 0
/*
* Override the implementation in NSMenuItemCell to behave the same
* as superclass NSButtonCell's implementation, since our direct
@ -1095,7 +1096,7 @@ static NSImage *_pbc_image[5];
style: _bezel_style
state: [self themeControlState]];
}
#endif
/*
* This drawing uses the same code that is used to draw cells in the menu.