From a77f9ca36a92d8e8bbdbb2788493750076122df9 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 3 Mar 1999 09:31:27 +0000 Subject: [PATCH] A few bugfixes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3847 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 9 +++++++++ Source/NSCell.m | 9 +-------- Source/NSTextFieldCell.m | 12 ++++++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7525b8fb4..c6ffcebc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Mar 3 08:53:00 1999 Richard Frith-Macdonald + + * Source/NSCell.m: ([-drawInteriorWithFrame:inView:]) don't draw + background - NSCell shouldn't draw backgrounds even if opaque - + it's the responsibility of the subclass. + ([-isOpaque]) Fixed to return NO as it should. + * Source/NSTextFieldCell.m: ([-drawInteriorWithFrame:inView:]) + handle drawing background if necessary before calling method in super. + Tue Mar 2 13:27:00 1999 Richard Frith-Macdonald * Source/NSView.m: Bugfix in redisplay - avoid views being redrawn diff --git a/Source/NSCell.m b/Source/NSCell.m index 567acb9a2..b9ffe379f 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -500,7 +500,7 @@ - (BOOL) isOpaque { - return cell_bezeled; + return NO; } - (void) setBezeled: (BOOL)flag @@ -618,13 +618,6 @@ { cellFrame = NSInsetRect(cellFrame, xDist, yDist); - // Clear the cell frame - if ([self isOpaque]) - { - [[NSColor lightGrayColor] set]; - NSRectFill(cellFrame); - } - switch ([self type]) { case NSTextCellType: diff --git a/Source/NSTextFieldCell.m b/Source/NSTextFieldCell.m index 3efa78f6f..b294befa8 100644 --- a/Source/NSTextFieldCell.m +++ b/Source/NSTextFieldCell.m @@ -229,6 +229,18 @@ [super setStringValue:aString]; } +- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView +{ + if (draw_background) + { + NSRect backgroundRect = NSInsetRect(cellFrame, xDist, yDist); + + [background_color set]; + NSRectFill(backgroundRect); + } + [super drawInteriorWithFrame: cellFrame inView: controlView]; +} + // // NSCoding protocol //