]> git.saurik.com Git - wxWidgets.git/commitdiff
first implementation for state on custom renderer, see #12890
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 2 Jun 2011 09:25:11 +0000 (09:25 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 2 Jun 2011 09:25:11 +0000 (09:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/dataview.mm

index e5314d3fd8649d0f2c16d6c5c438f217a9efa539..18537546b814f3a27512490bea30a75da6e453f5 100644 (file)
@@ -1179,7 +1179,11 @@ outlineView:(NSOutlineView*)outlineView
     wxGraphicsContext* gc = wxGraphicsContext::CreateFromNative(context);
     dc.SetGraphicsContext(gc);
 
-    renderer->WXCallRender(wxFromNSRect(controlView, cellFrame), &dc, 0);
+    int state = 0;
+    if ( [self isHighlighted] )
+        state |= wxDATAVIEW_CELL_SELECTED;
+
+    renderer->WXCallRender(wxFromNSRect(controlView, cellFrame), &dc, state);
 
     CGContextRestoreGState( context );
 }