Skip to content

Commit

Permalink
#2753 make it more obvious that a colored tab is inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
abhibeckert committed Aug 4, 2017
1 parent 765c895 commit 08e3de5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ - (NSColor *)fillColorForCell:(PSMTabBarCell *)cell
if([cell backgroundColor]) {
//should be a slightly darker variant of the color
fillColor = [[cell backgroundColor] shadowWithLevel:0.15];

// also desaturate the color
fillColor = [NSColor colorWithCalibratedHue:fillColor.hueComponent saturation:fillColor.saturationComponent * 0.4 brightness:fillColor.brightnessComponent alpha:1.0f];
}
}
} else {
Expand All @@ -651,7 +654,7 @@ - (NSColor *)fillColorForCell:(PSMTabBarCell *)cell
//make it dark first, then desaturate
if (cell.backgroundColor) {
NSColor *dark = [[cell backgroundColor] shadowWithLevel:0.15];
fillColor = [NSColor colorWithCalibratedHue:dark.hueComponent saturation:dark.saturationComponent brightness:(dark.brightnessComponent * 1.28) alpha:1.0f];
fillColor = [NSColor colorWithCalibratedHue:dark.hueComponent saturation:dark.saturationComponent * 0.15 brightness:(dark.brightnessComponent * 1.28) alpha:1.0f];
}
}
}
Expand Down

0 comments on commit 08e3de5

Please sign in to comment.