minor adjustments/code cleanup of the new group drawing code

This commit is contained in:
Mitchell Livingston 2008-05-14 22:57:46 +00:00
parent f59a61576c
commit cc3f907115
3 changed files with 2 additions and 11 deletions

View File

@ -38,8 +38,6 @@
- (int) rowValueForIndex: (int) index; - (int) rowValueForIndex: (int) index;
- (int) indexForRow: (int) row; - (int) indexForRow: (int) row;
- (CTGradient *) gradientForIndex: (int) index;
- (NSString *) nameForIndex: (int) index; - (NSString *) nameForIndex: (int) index;
- (void) setName: (NSString *) name forIndex: (int) index; - (void) setName: (NSString *) name forIndex: (int) index;

View File

@ -128,13 +128,6 @@ GroupsController * fGroupsInstance = nil;
return [[[fGroups objectAtIndex: row] objectForKey: @"Index"] intValue]; return [[[fGroups objectAtIndex: row] objectForKey: @"Index"] intValue];
} }
- (CTGradient *) gradientForIndex: (int) index
{
int orderIndex = [self rowValueForIndex: index];
//return orderIndex != -1 ? [self gradientForColor: [[fGroups objectAtIndex: orderIndex] objectForKey: @"Color"]] : nil;
return [CTGradient gradientWithBeginningColor: [NSColor blueColor] endingColor: [NSColor redColor]];
}
- (NSString *) nameForIndex: (int) index - (NSString *) nameForIndex: (int) index
{ {
int orderIndex = [self rowValueForIndex: index]; int orderIndex = [self rowValueForIndex: index];
@ -301,7 +294,7 @@ GroupsController * fGroupsInstance = nil;
[icon lockFocus]; [icon lockFocus];
//border //border
CTGradient * gradient = [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.55 ofColor: CTGradient * gradient = [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.45 ofColor:
[NSColor whiteColor]] endingColor: color]; [NSColor whiteColor]] endingColor: color];
[gradient fillBezierPath: bp angle: 270.0]; [gradient fillBezierPath: bp angle: 270.0];

View File

@ -435,7 +435,7 @@
//border //border
NSBezierPath * bp = [NSBezierPath bezierPathWithRoundedRect: groupRect radius: 6.0]; NSBezierPath * bp = [NSBezierPath bezierPathWithRoundedRect: groupRect radius: 6.0];
CTGradient * gradient = [CTGradient gradientWithBeginningColor: [groupColor blendedColorWithFraction: 0.55 ofColor: CTGradient * gradient = [CTGradient gradientWithBeginningColor: [groupColor blendedColorWithFraction: 0.45 ofColor:
[NSColor whiteColor]] endingColor: groupColor]; [NSColor whiteColor]] endingColor: groupColor];
[gradient fillBezierPath: bp angle: 90.0]; [gradient fillBezierPath: bp angle: 90.0];