]> git.saurik.com Git - wxWidgets.git/commitdiff
always use calibrated colors, fixes #14482
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 13 Jul 2012 06:51:04 +0000 (06:51 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 13 Jul 2012 06:51:04 +0000 (06:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/colour.mm
src/osx/cocoa/dataview.mm

index ade182c046bc4f57405c59f73cbfee705347a424..ac622553e40f799de76c5ae91318b6975cd4473f 100644 (file)
@@ -42,5 +42,5 @@ wxColour::wxColour(WX_NSColor col)
 
 WX_NSColor wxColour::OSXGetNSColor() const
 {
-    return [NSColor colorWithDeviceRed:m_red / 255.0 green:m_green / 255.0 blue:m_blue / 255.0 alpha:m_alpha / 255.0];
+    return [NSColor colorWithCalibratedRed:m_red / 255.0 green:m_green / 255.0 blue:m_blue / 255.0 alpha:m_alpha / 255.0];
 }
index 26fd4eee1a84d817f0f66c3aeec99973c657a178..4787a023c22513b96db585819cc3c9d3f81ed6bd 100644 (file)
@@ -1167,6 +1167,23 @@ outlineView:(NSOutlineView*)outlineView
 
 @implementation wxCustomCell
 
+#if 0 // starting implementation for custom cell clicks
+
+- (id)init
+{
+    self = [super init];
+    [self setAction:@selector(clickedAction)];
+    [self setTarget:self];
+    return self;
+}
+
+- (void) clickedAction: (id) sender
+{
+    wxUnusedVar(sender);
+}
+
+#endif
+
 -(NSSize) cellSize
 {
     wxCustomRendererObject * const
@@ -2697,7 +2714,7 @@ void wxDataViewRenderer::OSXApplyAttr(const wxDataViewItemAttr& attr)
             }
 
             const wxColour& c = attr.GetColour();
-            colText = [NSColor colorWithDeviceRed:c.Red() / 255.
+            colText = [NSColor colorWithCalibratedRed:c.Red() / 255.
                 green:c.Green() / 255.
                 blue:c.Blue() / 255.
                 alpha:c.Alpha() / 255.];