Factor out drawing of progress indicator's bezel and bar

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29003 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
hansfbaier 2009-11-14 03:46:00 +00:00
parent a6ac9e24c7
commit 2dd44b877b
3 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2009-11-14 Hans Baier <hansfbaier@googlemail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h,
* Source/GSThemeDrawing.m: Factor out drawing of progress
indicator's bezel and bar
2009-11-14 Hans Baier <hansfbaier@googlemail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h,

View file

@ -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;

View file

@ -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