]> git.saurik.com Git - wxWidgets.git/commitdiff
The rect passed to DrawTreeItemButton is already adjusted, we
authorRobin Dunn <robin@alldunn.com>
Wed, 1 Nov 2006 03:59:03 +0000 (03:59 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 1 Nov 2006 03:59:03 +0000 (03:59 +0000)
shouldn't do it again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/renderer.cpp

index b7bab73d9012644aa5ffe26fc246d9196730567f..aac95cbb8331afb17445dd20afa4115de4b63643 100644 (file)
@@ -192,11 +192,18 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win,
     const wxRect& rect,
     int flags )
 {
+#if 0  // The rect has already been adjusted, if that ever changes then uncomment this code.
     const wxCoord x = dc.LogicalToDeviceX(rect.x /*- 1*/);
     const wxCoord y = dc.LogicalToDeviceY(rect.y /*- 1*/);
     const wxCoord w = dc.LogicalToDeviceXRel(rect.width);
     const wxCoord h = dc.LogicalToDeviceYRel(rect.height);
-
+#else
+    const wxCoord x = rect.x;
+    const wxCoord y = rect.y;
+    const wxCoord w = rect.width;
+    const wxCoord h = rect.height;
+#endif    
+    
     dc.SetBrush( *wxTRANSPARENT_BRUSH );
 
     HIRect headerRect = CGRectMake( x, y, w, h );