From 600b0977e296b0313fa5befec3c6bf963f292818 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 18 Dec 2007 01:53:16 +0000 Subject: [PATCH] get the new group coloring correct in minimal mode --- macosx/GroupsWindowController.m | 6 +++--- macosx/TorrentCell.m | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/macosx/GroupsWindowController.m b/macosx/GroupsWindowController.m index 56bcd1894..f5a95555c 100644 --- a/macosx/GroupsWindowController.m +++ b/macosx/GroupsWindowController.m @@ -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 diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index e4f2e50f2..d5d4e230a 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -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