X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ed2e7ce8217e90bd9c074fea75c43d5629ce5bb..236a9de39afa090fdee3cf91cb5364ceca69e3f8:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 4432c7e0cb..ef3ab1defc 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -129,7 +129,7 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const wxPoint pt(0, 0); #if wxUSE_TOOLBAR - if ( GetToolBar() ) + if ( GetToolBar() && GetToolBar()->IsShown() ) { int w, h; GetToolBar()->GetSize(& w, & h); @@ -265,9 +265,9 @@ void wxFrameBase::OnSize(wxSizeEvent& WXUNUSED(event)) // for whatever reasons, wxGTK wants to have a small offset - it // probably looks better with it? #ifdef __WXGTK__ - static const int ofs = 0; -#else static const int ofs = 1; +#else + static const int ofs = 0; #endif child->SetSize(ofs, ofs, clientW - 2*ofs, clientH - 2*ofs); @@ -338,20 +338,18 @@ wxStatusBar *wxFrameBase::OnCreateStatusBar(int number, wxWindowID id, const wxString& name) { - wxStatusBar *statusBar = new wxStatusBar(this, id, - wxPoint(0, 0), wxSize(100, 20), - style, name); + wxStatusBar *statusBar = new wxStatusBar(this, id, style, name); // Set the height according to the font and the border size wxClientDC dc(statusBar); dc.SetFont(statusBar->GetFont()); - long y; + wxCoord y; dc.GetTextExtent( "X", NULL, &y ); int height = (int)( (11*y)/10 + 2*statusBar->GetBorderY()); - statusBar->SetSize( -1, -1, 100, height ); + statusBar->SetSize( -1, -1, -1, height ); statusBar->SetFieldsCount(number);