]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
moved wxDash typedef to gdicmn.h
[wxWidgets.git] / src / common / framecmn.cpp
index 4432c7e0cbfe99f6f141e50bacc32d9d095be7b7..ef3ab1defcbbdf4aa43e7caa4d32c0beb2a12c75 100644 (file)
@@ -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);