diff --git a/ChangeLog b/ChangeLog index f496373d1..013cbdf67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-14 Hans Baier + + * Headers/Additions/GNUstepGUI/GSTheme.h, + * Source/GSThemeDrawing.m: Factor out drawing of progress + indicator's bezel and bar + 2009-11-14 Hans Baier * Headers/Additions/GNUstepGUI/GSTheme.h, diff --git a/Headers/Additions/GNUstepGUI/GSTheme.h b/Headers/Additions/GNUstepGUI/GSTheme.h index 659978a7e..b042ce0ed 100644 --- a/Headers/Additions/GNUstepGUI/GSTheme.h +++ b/Headers/Additions/GNUstepGUI/GSTheme.h @@ -724,6 +724,9 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification; atCount: (int)count forValue: (double)val; +- (NSRect) drawProgressIndicatorBezel: (NSRect)bounds withClip: (NSRect) rect; +- (void) drawProgressIndicatorBarDeterminate: (NSRect)bounds; + // Table drawing methods - (void) drawTableCornerView: (NSView*)cornerView withClip: (NSRect)aRect; diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index bcdcfe4fd..52925ddf7 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -847,7 +847,7 @@ static NSImage *spinningImages[MaxCount]; if ([progress isBezeled]) { // Calc the inside rect to be drawn - r = [self drawGrayBezel: bounds withClip: rect]; + r = [self drawProgressIndicatorBezel: bounds withClip: rect]; } else { @@ -894,13 +894,22 @@ static NSImage *spinningImages[MaxCount]; r = NSIntersectionRect(r, rect); if (!NSIsEmptyRect(r)) { - [fillColour set]; - NSRectFill(r); + [self drawProgressIndicatorBarDeterminate: (NSRect)bounds]; } } } } +- (NSRect) drawProgressIndicatorBezel: (NSRect)bounds withClip: (NSRect) rect +{ + return [self drawGrayBezel: bounds withClip: rect]; +} + +- (void) drawProgressIndicatorBarDeterminate: (NSRect)bounds +{ + [fillColour set]; + NSRectFill(bounds); +} // Table drawing methods - (void) drawTableCornerView: (NSView*)cornerView