Mac: Use NSColor function available in older SDKs (issue #1605)

This commit is contained in:
Marshall Greenblatt 2015-05-19 14:54:28 -04:00
parent 0d905e3744
commit ead921a3f6
2 changed files with 4 additions and 2 deletions

View File

@ -667,7 +667,8 @@ BrowserOpenGLView* GLView(NSView* view) {
// Fill with the background color.
const cef_color_t background_color = renderer_->GetBackgroundColor();
NSColor* color =
[NSColor colorWithRed:float(CefColorGetR(background_color)) / 255.0f
[NSColor colorWithCalibratedRed:
float(CefColorGetR(background_color)) / 255.0f
green:float(CefColorGetG(background_color)) / 255.0f
blue:float(CefColorGetB(background_color)) / 255.0f
alpha:1.f];

View File

@ -467,7 +467,8 @@ void RootWindowMac::CreateRootWindow(const CefBrowserSettings& settings) {
const cef_color_t background_color = MainContext::Get()->GetBackgroundColor();
[window_ setBackgroundColor:
[NSColor colorWithRed:float(CefColorGetR(background_color)) / 255.0f
[NSColor colorWithCalibratedRed:
float(CefColorGetR(background_color)) / 255.0f
green:float(CefColorGetG(background_color)) / 255.0f
blue:float(CefColorGetB(background_color)) / 255.0f
alpha:1.f]];