From 36d7f54e469d8b6d877eeb89252159de4f1dcff7 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 6 Aug 2004 18:49:27 +0000 Subject: [PATCH] correcting border drawing for clientareaorigin in notebooks etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 7e931ec421..82980b387f 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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) ; } } }