silvansky / google-toolbox-for-mac

Automatically exported from code.google.com/p/google-toolbox-for-mac
Apache License 2.0
0 stars 0 forks source link

10.6: NSGradient doesn't work with LAB colorspaces #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
rdar://6857649 - NSGradient fails when using LAB Colorspace

causes -[GTMTheme patternColorForStyle:active:] to fail on 10.6 , sample code:

NSColor *backgroundColor = [NSColor blueColor];
NSColor *startColor = [backgroundColor 
gtm_colorAdjustedFor:GTMColorationLightShadow faded:NO];
NSColor *endColor = [backgroundColor 
gtm_colorAdjustedFor:GTMColorationLightShadow faded:NO]; 
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:startColor 
endingColor:endColor];

The workaround for this issue is to convert colors to RGB colorspace before 
passing them to NSGradient.

The workaround really messes up the surrounding code with conversions (and also 
makes a bunch of unittests fail since they assume they're getting LAB colors), 
so for now we're holding off.  If the radar bug isn't fixed soon we'll need to 
fix this in GTM.

Original issue reported on code.google.com by jeremy@chromium.org on 5 May 2009 at 6:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Looks like this is fixed in the latest seed, could someone close this issue 
please?

For the chromium folks I'll remove the workarround code next week.

Original comment by jeremy@chromium.org on 26 Jun 2009 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by dmaclach on 27 Jun 2009 at 1:07