Major fixes all around.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4677 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 1999-07-30 22:10:02 +00:00
parent 0ac5790122
commit c32570418e
11 changed files with 542 additions and 390 deletions

View file

@ -46,6 +46,16 @@
return [super init];
}
- (id)representedObject
{
if (cell_image)
{
return cell_image;
}
return contents;
}
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView*)view
{
@ -69,6 +79,12 @@
NSRectFill(arect);
}
if (cell_image)
{
[self _drawImage:cell_image inFrame:cellFrame];
return;
}
[cell_font set];
point.y = rect.origin.y + (rect.size.height/2) - 4;
@ -89,9 +105,9 @@
if ([view isKindOfClass:[NSMenuView class]])
{
NSPopUpButton *popb = [(NSMenuView *)view popupButton];
NSPopUpButton *popb = [[(NSMenuView *)view menu] popupButton];
if ([popb titleOfSelectedItem] == contents)
if ([[[popb selectedItem] representedObject] isEqual: contents])
{
if ([popb pullsDown] == NO)
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];
@ -101,7 +117,8 @@
}
else if ([view isKindOfClass:[NSPopUpButton class]])
{
if ([(NSPopUpButton *)view titleOfSelectedItem] == contents)
if ([[[(NSPopUpButton *)view selectedItem] representedObject]
isEqual: contents])
{
if ([(NSPopUpButton *)view pullsDown] == NO)
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];