From 8e33234f9356fabe3561574a9fe1268f6a0899e7 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Tue, 29 Jan 2002 21:25:33 +0000 Subject: [PATCH] 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 --- contrib/src/fl/toolwnd.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/src/fl/toolwnd.cpp b/contrib/src/fl/toolwnd.cpp index 1a8c7b617f..06db16ed57 100644 --- a/contrib/src/fl/toolwnd.cpp +++ b/contrib/src/fl/toolwnd.cpp @@ -165,15 +165,17 @@ void wxToolWindow::OnPaint( wxPaintEvent& event ) int w,h; GetSize( &w, &h ); - dc.SetBrush( *wxLIGHT_GREY_BRUSH ); - 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 ); + 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; + 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(); } -- 2.45.2