]> git.saurik.com Git - wxWidgets.git/commitdiff
correcting border drawing for clientareaorigin in notebooks etc.
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 6 Aug 2004 18:49:27 +0000 (18:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 6 Aug 2004 18:49:27 +0000 (18:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 7e931ec421337fefe9c3006b684486442958c318..82980b387fc1702195f8fd131f49d40d14f10e32 100644 (file)
@@ -2705,6 +2705,8 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
         // get the updateRgn wide enough to always do so, so we do it from the parent
         // this would also be the place to draw any custom backgrounds for native controls
         // in Composited windowing
+        wxPoint clientOrigin = GetClientAreaOrigin() ;
+        
         for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
         {
             wxWindowMac *child = node->GetData();
@@ -2718,9 +2720,9 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
             int w,h;
             child->GetSize( &w, &h );
             Rect childRect = { y , x , y + h , x + w } ;
+            OffsetRect( &childRect , clientOrigin.x , clientOrigin.y ) ;
             if ( child->MacGetTopBorderSize() )
             {
-                OffsetRect( &childRect , MacGetLeftBorderSize() , MacGetTopBorderSize() ) ;
                 if ( RectInRgn( &childRect , updatergn ) )
                 {
                     // paint custom borders
@@ -2731,7 +2733,7 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
                         wxWindowDC dc(this) ;
                         dc.SetClippingRegion(wxRegion(updatergn));
                         wxMacPortSetter helper(&dc) ;
-                        child->MacPaintBorders( dc.m_macLocalOrigin.x + x , dc.m_macLocalOrigin.y + y)  ;
+                        child->MacPaintBorders( dc.m_macLocalOrigin.x + childRect.left , dc.m_macLocalOrigin.y + childRect.top)  ;
                     }
                 }
             }