]> git.saurik.com Git - wxWidgets.git/commitdiff
correct scrolling and clipping of list headers
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 26 Mar 2005 05:12:57 +0000 (05:12 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 26 Mar 2005 05:12:57 +0000 (05:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/renderer.cpp

index d726076a49c98d63b654d8851737df2c199b877a..62ff9846c952a816f47fefeb5cd6c85bff753402 100644 (file)
@@ -135,10 +135,10 @@ wxRendererMac::DrawHeaderButton(wxWindow *win,
                                 const wxRect& rect,
                                 int flags)
 {
-    const wxCoord x = rect.x-1,
-                  y = rect.y-1,
-                  w = rect.width,
-                  h = rect.height;
+    const wxCoord x = dc.XLOG2DEV(rect.x-1),
+                  y = dc.YLOG2DEV(rect.y-1),
+                  w = dc.XLOG2DEVREL(rect.width),
+                  h = dc.YLOG2DEVREL(rect.height);
 
     int major,minor;
     wxGetOsVersion( &major, &minor );
@@ -169,6 +169,8 @@ wxRendererMac::DrawHeaderButton(wxWindow *win,
             QDBeginCGContext( (CGrafPtr) dc.m_macPort , &cgContext ) ;
             CGContextTranslateCTM( cgContext , 0 , bounds.bottom - bounds.top ) ;
             CGContextScaleCTM( cgContext , 1 , -1 ) ;
+                       HIShapeReplacePathInCGContext( HIShapeCreateWithQDRgn( (RgnHandle) dc.m_macCurrentClipRgn ) , cgContext ) ;
+                       CGContextClip( cgContext ) ; 
             HIViewConvertRect( &headerRect , (HIViewRef) win->GetHandle() , (HIViewRef) win->MacGetTopLevelWindow()->GetHandle() ) ;
 #endif
             {