Fix for OnSize() redraw problems - Submitted by Hans Van Leemputten

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker 2002-01-29 21:25:33 +00:00
parent 8ddffcdaca
commit 8e33234f93

View File

@ -165,15 +165,17 @@ void wxToolWindow::OnPaint( wxPaintEvent& event )
int w,h;
GetSize( &w, &h );
dc.SetBrush( *wxLIGHT_GREY_BRUSH );
dc.SetPen( *wxTRANSPARENT_PEN );
wxBrush backGround( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID );
//dc.SetBrush( *wxLIGHT_GREY_BRUSH );
dc.SetBrush( backGround );
dc.SetPen( *wxTRANSPARENT_PEN );
int y = mWndVertGap + mTitleHeight + mClntVertGap + 1;
dc.DrawRectangle( 0,0, w, y );
dc.DrawRectangle( 0,y-1, mWndHorizGap + mClntHorizGap + 1, h - y );
dc.DrawRectangle( w - ( mWndHorizGap + mClntHorizGap ), y-1,
mWndHorizGap + mClntHorizGap, h - y );
dc.DrawRectangle( 0, h - mWndVertGap - mClntVertGap, w, mWndVertGap + mClntVertGap );
int y = mWndVertGap + mTitleHeight + mClntVertGap;
dc.DrawRectangle( 0,0, w, y ); // Top grey part.
dc.DrawRectangle( 0,y-1, mWndHorizGap + mClntHorizGap, h - y ); // Left grey part.
dc.DrawRectangle( w - ( mWndHorizGap + mClntHorizGap ), y-1,
mWndHorizGap + mClntHorizGap, h - y ); // Right grey part.
dc.DrawRectangle( 0, h - mWndVertGap - mClntVertGap, w, mWndVertGap + mClntVertGap ); // Bottom grey part.
// draw shades
dc.SetPen( *wxLIGHT_GREY_PEN );
@ -679,14 +681,12 @@ void wxToolWindow::OnSize( wxSizeEvent& event )
int x = mWndHorizGap + mClntHorizGap;
int y = mWndVertGap + mTitleHeight + mClntVertGap;
#if 1
mpClientWnd->SetSize( x -1, y -1,
w - 2*(mWndHorizGap + mClntHorizGap),
h - y - mClntVertGap - mWndVertGap,
0
);
#endif
}
mpClientWnd->SetSize( x-1, y-1,
w - 2*(mWndHorizGap + mClntHorizGap),
h - y - mClntVertGap - mWndVertGap,
0
);
}
LayoutMiniButtons();
}