From 2331e2cecc27616048251b2e308469b66170ed7c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 13 Jul 2012 06:51:04 +0000 Subject: [PATCH] always use calibrated colors, fixes #14482 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/colour.mm | 2 +- src/osx/cocoa/dataview.mm | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/osx/cocoa/colour.mm b/src/osx/cocoa/colour.mm index ade182c046..ac622553e4 100644 --- a/src/osx/cocoa/colour.mm +++ b/src/osx/cocoa/colour.mm @@ -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]; } diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 26fd4eee1a..4787a023c2 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -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.];