--- gui.orig/Source/NSProgressIndicator.m Mon Apr 14 02:03:09 2003 +++ gui.mod/Source/NSProgressIndicator.m Mon Apr 21 00:59:00 2003 @@ -27,6 +27,7 @@ #include #include #include +#include @implementation NSProgressIndicator @@ -223,6 +224,7 @@ - (void)drawRect:(NSRect)rect { NSRect r; + int offset=0; // Draw the Bezel if (_isBezeled) @@ -232,6 +234,7 @@ NSDrawGrayBezel(_bounds, rect); // Calc the inside rect to be drawn r = NSInsetRect(_bounds, borderSize.width, borderSize.height); + offset=2; } else r = _bounds; @@ -258,11 +261,47 @@ r = NSIntersectionRect(r,rect); if (!NSIsEmptyRect(r)) { - [fillColour set]; + [[NSColor grayColor] set]; NSRectFill(r); } } + } + + //Draws the Marks + double perc, step; + int count; + + if ((rect.size.height >= 15) && (rect.size.width >= 79)) { + step = ((rect.size.width) / 100.0) * 5.0; + + perc = ( _doubleValue - _minValue) * 100 / (_maxValue - _minValue); + + [[NSColor darkGrayColor] set]; + + for (count = 1; count < 20; count++) { + + if (count == 10) { + // 50% Mark + [[NSColor blackColor] set]; + NSRectFill (NSMakeRect(count*step, offset, 1, r.size.height/1.5)); + [[NSColor darkGrayColor] set]; + } + else if (( count % 2) == 0) + // 10% Marks + NSRectFill (NSMakeRect(count*step,offset, 1, r.size.height/2)); + else + // 5% Marks + NSRectFill (NSMakeRect(count*step, offset, 1, r.size.height/4)); + + + } + } + + //Draws the Marker + + [[NSColor blackColor] set]; + NSRectFill (NSMakeRect(r.size.width+offset, offset, 1, r.size.height)); } // It does not seem that Gnustep has a copyWithZone: on NSView, it is private --- gui.orig/Source/NSScroller.m Mon Apr 14 01:45:39 2003 +++ gui.mod/Source/NSScroller.m Mon Apr 21 00:08:46 2003 @@ -827,17 +827,44 @@ - (void) drawKnobSlot { static NSRect rect; - + + NSImage* stippledImage = [NSImage imageNamed: @"common_Stippled"]; if (_cacheValid == NO) { rect = [self rectForPart: NSScrollerKnobSlot]; } - + if ((_usableParts == NSOnlyScrollerArrows) || (_usableParts == NSNoScrollerParts)) [[_window backgroundColor] set]; - else - [scrollBarColor set]; - NSRectFill (rect); + else { + + //tiles the stippled Image on the Background + + if (stippledImage != nil) { + float posX = rect.origin.x; + float posY = rect.origin.y; + float maxX = rect.origin.x + rect.size.width; + float maxY = rect.origin.y + rect.size.height; + float height = [stippledImage size].height; + float width = [stippledImage size].width; + + RETAIN(stippledImage); + + do { + do { + [stippledImage compositeToPoint: NSMakePoint (posX,posY) fromRect: NSMakeRect(0,0, maxX-posX, maxY-posY) operation: NSCompositeCopy]; + posX += width; + } + while (posX < maxX); + posY += height; + posX = rect.origin.x; + } + while (posY < maxY); + + RELEASE(stippledImage); + } + + } } - (void) highlight: (BOOL)flag --- gui.orig/Source/NSSliderCell.m Sat Feb 1 06:10:00 2003 +++ gui.mod/Source/NSSliderCell.m Mon Apr 21 00:11:23 2003 @@ -96,8 +96,29 @@ only.

*/ - (void) drawBarInside: (NSRect)rect flipped: (BOOL)flipped { - [[NSColor scrollBarColor] set]; - NSRectFill(rect); + NSImage* stippledImage = [NSImage imageNamed: @"common_Stippled"]; + + // tiles the stippled Image on the Background + + if (stippledImage != nil) { + float posX = rect.origin.x; + float posY = rect.origin.y; + float maxX = rect.origin.x + rect.size.width; + float maxY = rect.origin.y + rect.size.height; + float height = [stippledImage size].height; + float width = [stippledImage size].width; + RETAIN(stippledImage); + + do { + do { + [stippledImage compositeToPoint: NSMakePoint (posX,posY) fromRect: NSMakeRect(0,0, maxX-posX, maxY-posY) operation: NSCompositeCopy]; + posX += width; + } while (posX <= maxX); + posX = rect.origin.x; + posY += height; + } while (posY < maxY); + RELEASE(stippledImage); + } } /**