minor adjustments/code cleanup of the new group drawing code
This commit is contained in:
parent
f59a61576c
commit
cc3f907115
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue