]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing repositioning problem for statusbar
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 29 Aug 2004 15:53:14 +0000 (15:53 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 29 Aug 2004 15:53:14 +0000 (15:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/frame.cpp

index 9bb8cb9357371115831107e60e0b2a7b90068fd8..10299ff3d2d1997971ccb70608d2e512151a4b12 100644 (file)
@@ -110,7 +110,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
 
     statusBar = new wxStatusBar(this, id,
         style, name);
-    statusBar->SetSize( 100 , 15 ) ;
+    statusBar->SetSize( 100 , WX_MAC_STATUSBAR_HEIGHT ) ;
     statusBar->SetFieldsCount(number);
     return statusBar;
 }
@@ -121,12 +121,10 @@ void wxFrame::PositionStatusBar()
     {
         int w, h;
         GetClientSize(&w, &h);
-        int sw, sh;
-        m_frameStatusBar->GetSize(&sw, &sh);
         
         // Since we wish the status bar to be directly under the client area,
         // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
-        m_frameStatusBar->SetSize(0, h, w, sh);
+        m_frameStatusBar->SetSize(0, h, w, WX_MAC_STATUSBAR_HEIGHT);
     }
 }
 
@@ -228,9 +226,7 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
 #if wxUSE_STATUSBAR
     if ( GetStatusBar() && y )
     {
-        int statusX, statusY;
-        GetStatusBar()->GetSize(&statusX, &statusY);
-        if ( y) *y -= statusY;
+        if ( y) *y -= WX_MAC_STATUSBAR_HEIGHT;
     }
 #endif // wxUSE_STATUSBAR