Index: NSStepperCell.m =================================================================== --- NSStepperCell.m (Revision 22695) +++ NSStepperCell.m (Arbeitskopie) @@ -32,6 +32,7 @@ #include "AppKit/NSGraphics.h" #include "AppKit/NSStepperCell.h" #include "AppKit/NSText.h" +#include "GNUstepGUI/GSDrawFunctions.h" @implementation NSStepperCell + (void) initialize @@ -126,6 +127,7 @@ static inline void DrawUpButton(NSRect aRect) { + /* NSRectEdge up_sides[] = {NSMinXEdge, NSMaxYEdge, NSMaxXEdge, NSMinYEdge}; float grays[] = {NSWhite, NSWhite, @@ -139,6 +141,12 @@ DPSsetgray(ctxt, NSLightGray); DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect)); + */ + + NSRect unHighlightRect = NSInsetRect(aRect, 1., 1.); + [GSDrawFunctions drawButton: aRect : NSZeroRect]; + [[NSColor controlBackgroundColor] set]; + NSRectFill (unHighlightRect); PSsetgray(NSDarkGray); PSmoveto(NSMaxX(aRect) - 5, NSMinY(aRect) + 3); @@ -156,6 +164,7 @@ static inline void HighlightUpButton(NSRect aRect) { + /* NSRectEdge up_sides[] = {NSMinXEdge, NSMaxYEdge, NSMaxXEdge, NSMinYEdge}; float grays[] = {NSWhite, NSWhite, @@ -169,7 +178,12 @@ DPSsetgray(ctxt, NSWhite); DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect)); - + */ + NSRect highlightRect = NSInsetRect(aRect, 1., 1.); + [GSDrawFunctions drawButton: aRect : NSZeroRect]; + [[NSColor selectedControlColor] set]; + NSRectFill (highlightRect); + PSsetgray(NSLightGray); PSmoveto(NSMaxX(aRect) - 5, NSMinY(aRect) + 3); PSlineto(NSMaxX(aRect) - 8, NSMinY(aRect) + 9); @@ -186,6 +200,7 @@ static inline void DrawDownButton(NSRect aRect) { + /* NSRectEdge up_sides[] = {NSMinXEdge, NSMaxYEdge, NSMaxXEdge, NSMinYEdge}; float grays[] = {NSWhite, NSWhite, @@ -199,7 +214,13 @@ DPSsetgray(ctxt, NSLightGray); DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect)); + */ + NSRect unHighlightRect = NSInsetRect(aRect, 1., 1.); + [GSDrawFunctions drawButton: aRect : NSZeroRect]; + [[NSColor controlBackgroundColor] set]; + NSRectFill (unHighlightRect); + PSsetlinewidth(1.0); PSsetgray(NSDarkGray); PSmoveto(NSMinX(aRect) + 4, NSMaxY(aRect) - 3); @@ -217,6 +238,7 @@ static inline void HighlightDownButton(NSRect aRect) { + /* NSRectEdge up_sides[] = {NSMinXEdge, NSMaxYEdge, NSMaxXEdge, NSMinYEdge}; float grays[] = {NSWhite, NSWhite, @@ -230,6 +252,12 @@ DPSsetgray(ctxt, NSWhite); DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect)); + */ + + NSRect highlightRect = NSInsetRect(aRect, 1., 1.); + [GSDrawFunctions drawButton: aRect : NSZeroRect]; + [[NSColor selectedControlColor] set]; + NSRectFill (highlightRect); PSsetlinewidth(1.0); PSsetgray(NSLightGray);