]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/utilscocoa.mm
Fixed enabling/disabling for wxSpinCtrl
[wxWidgets.git] / src / osx / carbon / utilscocoa.mm
index 115defc589beb0aa24177036e227754ee0bfee5e..5153ed6740c9fbbe6d428c371d2e869a06b935e2 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/osx/carbon/utils.mm
+// Name:        src/osx/carbon/utilscocoa.mm
 // Purpose:     various cocoa mixin utility functions
 // Author:      Stefan Csomor
 // Modified by:
 
 #include "wx/wxprec.h"
 
+#ifndef WX_PRECOMP
+#include "wx/object.h"
+#endif
+
 #if wxOSX_USE_COCOA_OR_CARBON
 #include <Cocoa/Cocoa.h>
 #else
@@ -413,8 +417,7 @@ CGImageRef wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage )
     if (nsimage != nil)
     {
         NSSize imageSize = [nsimage size];
-        CGColorSpaceRef genericRGB = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); 
-        CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, genericRGB, kCGImageAlphaPremultipliedFirst); 
+        CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst); 
         NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
         [NSGraphicsContext saveGraphicsState];
         [NSGraphicsContext setCurrentContext:nsGraphicsContext];