mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
get the new group coloring correct in minimal mode
This commit is contained in:
parent
baa143b9b1
commit
600b0977e2
2 changed files with 7 additions and 5 deletions
|
@ -348,7 +348,7 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
||||||
NSImage * icon = [[NSImage alloc] initWithSize: NSMakeSize(16.0, 16.0)];
|
NSImage * icon = [[NSImage alloc] initWithSize: NSMakeSize(16.0, 16.0)];
|
||||||
|
|
||||||
[icon lockFocus];
|
[icon lockFocus];
|
||||||
[[self gradientForColor: [dict objectForKey: @"Color"]] fillBezierPath: bp angle: 90];
|
[[self gradientForColor: [dict objectForKey: @"Color"]] fillBezierPath: bp angle: 270.0];
|
||||||
[icon unlockFocus];
|
[icon unlockFocus];
|
||||||
|
|
||||||
[item setImage: icon];
|
[item setImage: icon];
|
||||||
|
@ -374,8 +374,8 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
||||||
|
|
||||||
- (CTGradient *) gradientForColor: (NSColor *) color
|
- (CTGradient *) gradientForColor: (NSColor *) color
|
||||||
{
|
{
|
||||||
return [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.2 ofColor: [NSColor whiteColor]]
|
return [CTGradient gradientWithBeginningColor: [color blendedColorWithFraction: 0.7 ofColor: [NSColor whiteColor]]
|
||||||
endingColor: [color blendedColorWithFraction: 0.7 ofColor: [NSColor whiteColor]]];
|
endingColor: [color blendedColorWithFraction: 0.2 ofColor: [NSColor whiteColor]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) changeColor: (id) sender
|
- (void) changeColor: (id) sender
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#define PADDING_BETWEEN_PROGRESS_AND_BAR 2.0
|
#define PADDING_BETWEEN_PROGRESS_AND_BAR 2.0
|
||||||
#define PADDING_BETWEEN_TITLE_AND_BAR_MIN 3.0
|
#define PADDING_BETWEEN_TITLE_AND_BAR_MIN 3.0
|
||||||
#define PADDING_BETWEEN_BAR_AND_STATUS 2.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 MAX_PIECES 324
|
||||||
#define BLANK_PIECE -99
|
#define BLANK_PIECE -99
|
||||||
|
@ -208,12 +210,12 @@
|
||||||
if (groupValue != -1)
|
if (groupValue != -1)
|
||||||
{
|
{
|
||||||
NSRect groupRect = cellFrame;
|
NSRect groupRect = cellFrame;
|
||||||
groupRect.size.width = 38.0;
|
groupRect.size.width = minimal ? WIDTH_GROUP_MIN : WIDTH_GROUP;
|
||||||
groupRect.origin.x -= 1.0;
|
groupRect.origin.x -= 1.0;
|
||||||
groupRect.size.height += 1.0;
|
groupRect.size.height += 1.0;
|
||||||
groupRect.origin.y -= 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
|
//error image
|
||||||
|
|
Loading…
Reference in a new issue