]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/colordlgosx.mm
Document lack of wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK under OS X.
[wxWidgets.git] / src / osx / carbon / colordlgosx.mm
index d60418311cfab27d5264c6276de334d52c4b3aed..4f12861d3d571d0f2b934bede481e7a80494e62f 100644 (file)
@@ -106,12 +106,13 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
     NSAutoreleasePool *thePool;
     thePool = [[NSAutoreleasePool alloc] init];
 
+    [[NSColorPanel sharedColorPanel] setShowsAlpha:YES];
     if(m_colourData.GetColour().IsOk())
         [[NSColorPanel sharedColorPanel] setColor:
             [NSColor colorWithCalibratedRed:(CGFloat) (m_colourData.GetColour().Red() / 255.0)
                                         green:(CGFloat) (m_colourData.GetColour().Green() / 255.0)
                                         blue:(CGFloat) (m_colourData.GetColour().Blue() / 255.0)
-                                        alpha:(CGFloat) 1.0]
+                                        alpha:(CGFloat) (m_colourData.GetColour().Alpha() / 255.0)]
         ];
     else
         [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
@@ -167,8 +168,9 @@ int wxColourDialog::ShowModal()
     m_colourData.GetColour().Set(
                                 (unsigned char) ([theColor redComponent] * 255.0),
                                 (unsigned char) ([theColor greenComponent] * 255.0),
-                                (unsigned char) ([theColor blueComponent] * 255.0)
-                                   );
+                                (unsigned char) ([theColor blueComponent] * 255.0),
+                                (unsigned char) ([theColor alphaComponent] * 255.0)
+                                 );
 
     //Release the pool, we're done :)
     [thePool release];