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