diff --git a/ChangeLog b/ChangeLog index 3fb95ea6e..64b41b9ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-11 Fred Kiefer + + * Source/NSMenuItemCell.m: (-drawBorderAndBackgroundWithFrame:inView:) + Let GSDrawFunctions do the border drawing. Removed caching of + colour class. + * Source/NSImageCell.m: (-drawWithFrame:inView:) Let + GSDrawFunctions do the border drawing. + 2004-02-10 21:48 Alexander Malmberg * Headers/AppKit/NSFont.h: Add cachedScreenFont ivar. diff --git a/Source/NSImageCell.m b/Source/NSImageCell.m index b43d1202b..629302579 100644 --- a/Source/NSImageCell.m +++ b/Source/NSImageCell.m @@ -31,6 +31,7 @@ #include "AppKit/NSGraphics.h" #include "AppKit/NSImageCell.h" #include "AppKit/NSImage.h" +#include "GNUstepGUI/GSDrawFunctions.h" @implementation NSImageCell @@ -133,16 +134,16 @@ // nada break; case NSImageFramePhoto: - NSDrawFramePhoto(cellFrame, NSZeroRect); + [GSDrawFunctions drawFramePhoto: cellFrame : NSZeroRect]; break; case NSImageFrameGrayBezel: - NSDrawGrayBezel(cellFrame, NSZeroRect); + [GSDrawFunctions drawGrayBezel: cellFrame : NSZeroRect]; break; case NSImageFrameGroove: - NSDrawGroove(cellFrame, NSZeroRect); + [GSDrawFunctions drawGroove: cellFrame : NSZeroRect]; break; case NSImageFrameButton: - NSDrawButton(cellFrame, NSZeroRect); + [GSDrawFunctions drawButton: cellFrame : NSZeroRect]; break; } diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 88562765a..e495fa425 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -41,11 +41,11 @@ #include "AppKit/NSMenu.h" #include "AppKit/NSMenuItemCell.h" #include "AppKit/NSMenuView.h" +#include "GNUstepGUI/GSDrawFunctions.h" @implementation NSMenuItemCell -static Class colorClass = 0; /* Cache color class. */ static NSImage *arrowImage = nil; /* Cache arrow image. */ @@ -54,7 +54,6 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ if (self == [NSMenuItemCell class]) { [self setVersion: 2]; - colorClass = [NSColor class]; arrowImage = [[NSImage imageNamed: @"common_3DArrowRight"] copy]; } } @@ -361,11 +360,11 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ if (_cell.is_highlighted && (_highlightsByMask & NSPushInCellMask)) { - NSDrawGrayBezel(cellFrame, NSZeroRect); + [GSDrawFunctions drawGrayBezel: cellFrame : NSZeroRect]; } else { - NSDrawButton(cellFrame, NSZeroRect); + [GSDrawFunctions drawButton: cellFrame : NSZeroRect]; } } @@ -548,10 +547,10 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */ */ if (mask & (NSChangeGrayCellMask | NSChangeBackgroundCellMask)) { - _backgroundColor = [colorClass selectedMenuItemColor]; + _backgroundColor = [NSColor selectedMenuItemColor]; } if (_backgroundColor == nil) - _backgroundColor = [colorClass controlBackgroundColor]; + _backgroundColor = [NSColor controlBackgroundColor]; // Set cell's background color [_backgroundColor set];