Updated for changes in cell's ivar names; use them.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 1999-12-13 02:50:14 +00:00
parent 4e87315937
commit d47053faba

View file

@ -42,11 +42,11 @@ static NSColor *clearCol = nil;
{ {
[super initTextCell: aString]; [super initTextCell: aString];
[self setAlignment: NSCenterTextAlignment]; _text_align = NSCenterTextAlignment;
[self setTextColor: [NSColor windowFrameTextColor]]; ASSIGN (_text_color, [NSColor windowFrameTextColor]);
[self setBackgroundColor: [NSColor controlShadowColor]]; [self setBackgroundColor: [NSColor controlShadowColor]];
[self setBordered: NO]; _cell.is_bordered = NO;
[self setBezeled: NO]; _cell.is_bezeled = NO;
_draws_background = YES; _draws_background = YES;
return self; return self;
@ -56,7 +56,7 @@ static NSColor *clearCol = nil;
- (void) drawInteriorWithFrame: (NSRect)cellFrame - (void) drawInteriorWithFrame: (NSRect)cellFrame
inView: (NSView*)controlView inView: (NSView*)controlView
{ {
switch ([self type]) switch (_cell_type)
{ {
case NSTextCellType: case NSTextCellType:
[super drawInteriorWithFrame: cellFrame inView: controlView]; [super drawInteriorWithFrame: cellFrame inView: controlView];
@ -82,32 +82,32 @@ static NSColor *clearCol = nil;
{ {
NSColor *bg; NSColor *bg;
if (cell_highlighted) if (_cell.is_highlighted)
bg = bgCol; bg = bgCol;
else else
bg = hbgCol; bg = hbgCol;
[bg set]; [bg set];
NSRectFill (cellFrame); NSRectFill (cellFrame);
if (cell_image) if (_cell_image)
[cell_image setBackgroundColor: bg]; [_cell_image setBackgroundColor: bg];
} }
else else
{ {
if (cell_image) if (_cell_image)
[cell_image setBackgroundColor: clearCol]; [_cell_image setBackgroundColor: clearCol];
} }
// Draw the image // Draw the image
if (cell_image) if (_cell_image)
{ {
NSSize size; NSSize size;
NSPoint position; NSPoint position;
size = [cell_image size]; size = [_cell_image size];
position.x = MAX (NSMidX (cellFrame) - (size.width/2.), 0.); position.x = MAX (NSMidX (cellFrame) - (size.width/2.), 0.);
position.y = MAX (NSMidY (cellFrame) - (size.height/2.), 0.); position.y = MAX (NSMidY (cellFrame) - (size.height/2.), 0.);
if ([control_view isFlipped]) if ([controlView isFlipped])
position.y += size.height; position.y += size.height;
[cell_image compositeToPoint: position operation: NSCompositeCopy]; [_cell_image compositeToPoint: position operation: NSCompositeCopy];
} }
// End the drawing // End the drawing
[controlView unlockFocus]; [controlView unlockFocus];