mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
make group color a little more subtle
This commit is contained in:
parent
c9fbba20d2
commit
b796e37228
1 changed files with 3 additions and 11 deletions
|
@ -51,7 +51,6 @@
|
|||
#define PADDING_BETWEEN_TITLE_AND_BAR_MIN 3.0
|
||||
#define PADDING_BETWEEN_BAR_AND_STATUS 2.0
|
||||
|
||||
#define WIDTH_GROUP_FADE 16.0
|
||||
#define WIDTH_GROUP 40.0
|
||||
#define WIDTH_GROUP_MIN 24.0
|
||||
|
||||
|
@ -211,21 +210,14 @@
|
|||
int groupValue = [torrent groupValue];
|
||||
if (groupValue != -1)
|
||||
{
|
||||
NSColor * color = [[[GroupsWindowController groupsController] colorForIndex: groupValue]
|
||||
blendedColorWithFraction: 0.3 ofColor: [NSColor whiteColor]];
|
||||
|
||||
NSRect groupRect = cellFrame;
|
||||
groupRect.size.width = (minimal ? WIDTH_GROUP_MIN : WIDTH_GROUP) - WIDTH_GROUP_FADE;
|
||||
groupRect.size.width = minimal ? WIDTH_GROUP_MIN : WIDTH_GROUP;
|
||||
groupRect.origin.x -= 1.0;
|
||||
groupRect.size.height += 1.0;
|
||||
groupRect.origin.y -= 1.0;
|
||||
|
||||
[color set];
|
||||
NSRectFill(groupRect);
|
||||
|
||||
groupRect.origin.x += groupRect.size.width;
|
||||
groupRect.size.width = WIDTH_GROUP_FADE;
|
||||
|
||||
NSColor * color = [[[GroupsWindowController groupsController] colorForIndex: groupValue]
|
||||
blendedColorWithFraction: 0.3 ofColor: [NSColor whiteColor]];
|
||||
CTGradient * gradient = [CTGradient gradientWithBeginningColor: color endingColor: [color colorWithAlphaComponent: 0.0]];
|
||||
[gradient fillRect: groupRect angle: 0.0];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue