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
This commit is contained in:
Stefan Csomor 2004-08-06 18:49:27 +00:00
parent 101634b2e4
commit 36d7f54e46

View 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) ;
}
}
}