1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

get the new group coloring correct in minimal mode

This commit is contained in:
Mitchell Livingston 2007-12-18 01:53:16 +00:00
parent baa143b9b1
commit 600b0977e2
2 changed files with 7 additions and 5 deletions

View file

@ -348,7 +348,7 @@ GroupsWindowController * fGroupsWindowInstance = nil;
NSImage * icon = [[NSImage alloc] initWithSize: NSMakeSize(16.0, 16.0)];
[icon lockFocus];
[[self gradientForColor: [dict objectForKey: @"Color"]] fillBezierPath: bp angle: 90];
[[self gradientForColor: [dict objectForKey: @"Color"]] fillBezierPath: bp angle: 270.0];
[icon unlockFocus];
[item setImage: icon];
@ -374,8 +374,8 @@ GroupsWindowController * fGroupsWindowInstance = nil;
- (CTGradient *) gradientForColor: (NSColor *) color
{
return [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.2 ofColor: [NSColor whiteColor]]
endingColor: [color blendedColorWithFraction: 0.7 ofColor: [NSColor whiteColor]]];
return [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.7 ofColor: [NSColor whiteColor]]
endingColor: [color blendedColorWithFraction: 0.2 ofColor: [NSColor whiteColor]]];
}
- (void) changeColor: (id) sender

View file

@ -50,6 +50,8 @@
#define PADDING_BETWEEN_PROGRESS_AND_BAR 2.0
#define PADDING_BETWEEN_TITLE_AND_BAR_MIN 3.0
#define PADDING_BETWEEN_BAR_AND_STATUS 2.0
#define WIDTH_GROUP 38.0
#define WIDTH_GROUP_MIN 22.0
#define MAX_PIECES 324
#define BLANK_PIECE -99
@ -208,12 +210,12 @@
if (groupValue != -1)
{
NSRect groupRect = cellFrame;
groupRect.size.width = 38.0;
groupRect.size.width = minimal ? WIDTH_GROUP_MIN : WIDTH_GROUP;
groupRect.origin.x -= 1.0;
groupRect.size.height += 1.0;
groupRect.origin.y -= 1.0;
[[[GroupsWindowController groupsController] gradientForIndex: groupValue] fillRect: groupRect angle: 270];
[[[GroupsWindowController groupsController] gradientForIndex: groupValue] fillRect: groupRect angle: 90];
}
//error image