Commit 22f71275 authored by Anthony Léonard's avatar Anthony Léonard Committed by Olivier SOLDANO

replace gradient separator with flat color

The smartlist separators is now a plain grey instead of a gradient
color. This is done in order to give Ring a more modern look.

Change-Id: I0a52a57a487a3c4ba3e13e49e31d29288b43cc78
Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
parent 053283b2
......@@ -123,15 +123,6 @@
self.mouseInside = NO;
}
static NSGradient *gradientWithTargetColor(NSColor *targetColor) {
NSArray *colors = [NSArray arrayWithObjects:[targetColor colorWithAlphaComponent:0],
targetColor,
targetColor,
[targetColor colorWithAlphaComponent:0], nil];
const CGFloat locations[4] = { 0.0, 0.35, 0.65, 1.0 };
return [[NSGradient alloc] initWithColors:colors atLocations:locations colorSpace:[NSColorSpace sRGBColorSpace]];
}
- (void)drawBackgroundInRect:(NSRect)dirtyRect {
// Custom background drawing. We don't call super at all.
[self.backgroundColor set];
......@@ -194,10 +185,7 @@ static NSGradient *gradientWithTargetColor(NSColor *targetColor) {
@end
void DrawSeparatorInRect(NSRect rect) {
// Cache the gradient for performance
static NSGradient *gradient = nil;
if (gradient == nil) {
gradient = gradientWithTargetColor([NSColor colorWithSRGBRed:.80 green:.80 blue:.80 alpha:1]);
}
[gradient drawInRect:rect angle:0];
static NSColor *color = [NSColor colorWithSRGBRed:.90 green:.90 blue:.90 alpha:1];
[color drawSwatchInRect:rect];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment