fixed bugs with setting the client size when the difference between the total and client size changes as the result (e.g. because the scrollbars [dis]appear or the menu bar [un]wraps

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-12-08 23:13:27 +00:00
parent 8810d43125
commit d4597e138e
6 changed files with 125 additions and 106 deletions

View File

@@ -148,12 +148,13 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin();
#if wxUSE_TOOLBAR
if ( GetToolBar() && GetToolBar()->IsShown() )
wxToolBar *toolbar = GetToolBar();
if ( toolbar && toolbar->IsShown() )
{
int w, h;
GetToolBar()->GetSize(& w, & h);
toolbar->GetSize(&w, &h);
if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL )
if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )
{
pt.x += w;
}
@@ -186,7 +187,7 @@ bool wxFrameBase::ProcessCommand(int id)
{
if (!item->IsEnabled())
return TRUE;
if (item->IsCheckable())
{
item->Toggle();