X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a3d495c0cadd93e6c49464a79cbfb6ccc122342..63a6419cd78377e197697e5e8b28f9e2e9d96ddc:/src/osx/carbon/databrow.cpp diff --git a/src/osx/carbon/databrow.cpp b/src/osx/carbon/databrow.cpp index d84ee4ba2c..0c30b68a0f 100644 --- a/src/osx/carbon/databrow.cpp +++ b/src/osx/carbon/databrow.cpp @@ -1059,14 +1059,19 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowse // try to determine the content's size (drawable part): Rect content; - RgnHandle rgn(NewRgn()); + HIShapeRef rgn = NULL; + UInt16 headerHeight; - if (this->GetRegion(kControlContentMetaPart,rgn) == noErr) - GetRegionBounds(rgn,&content); + if ( HIViewCopyShape(m_controlRef, kHIViewContentMetaPart, &rgn) == noErr) + { + CGRect cgrect; + HIShapeGetBounds(rgn, &cgrect); + content = (Rect){ cgrect.origin.y, cgrect.origin.x, cgrect.origin.y+cgrect.size.height, cgrect.origin.x+cgrect.size.width }; + CFRelease(rgn); + } else GetControlBounds(m_controlRef, &content); - ::DisposeRgn(rgn); // space for the header this->GetHeaderButtonHeight(&headerHeight); content.top += headerHeight;