moved toolbar adjustments for the client size from wxTLWMSW to wxFrameMSW to fix problems in wxUniv

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-01-10 23:58:31 +00:00
parent 37fd1c97bd
commit 68d02db3ed
3 changed files with 15 additions and 33 deletions

View File

@@ -157,6 +157,11 @@ void wxFrame::DoSetClientSize(int width, int height)
}
#endif // wxUSE_STATUSBAR
// call GetClientAreaOrigin() to take the toolbar into account
wxPoint pt = GetClientAreaOrigin();
width += pt.x;
height += pt.y;
wxTopLevelWindow::DoSetClientSize(width, height);
}
@@ -165,6 +170,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
{
wxTopLevelWindow::DoGetClientSize(x, y);
// account for the possible toolbar
wxPoint pt = GetClientAreaOrigin();
if ( x )
*x -= pt.x;
if ( y )
*y -= pt.y;
#if wxUSE_STATUSBAR
// adjust client area height to take the status bar into account
if ( y )