fixing repositioning problem for statusbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,7 +110,7 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
|
|||||||
|
|
||||||
statusBar = new wxStatusBar(this, id,
|
statusBar = new wxStatusBar(this, id,
|
||||||
style, name);
|
style, name);
|
||||||
statusBar->SetSize( 100 , 15 ) ;
|
statusBar->SetSize( 100 , WX_MAC_STATUSBAR_HEIGHT ) ;
|
||||||
statusBar->SetFieldsCount(number);
|
statusBar->SetFieldsCount(number);
|
||||||
return statusBar;
|
return statusBar;
|
||||||
}
|
}
|
||||||
@@ -121,12 +121,10 @@ void wxFrame::PositionStatusBar()
|
|||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(&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,
|
// Since we wish the status bar to be directly under the client area,
|
||||||
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
|
// 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 wxUSE_STATUSBAR
|
||||||
if ( GetStatusBar() && y )
|
if ( GetStatusBar() && y )
|
||||||
{
|
{
|
||||||
int statusX, statusY;
|
if ( y) *y -= WX_MAC_STATUSBAR_HEIGHT;
|
||||||
GetStatusBar()->GetSize(&statusX, &statusY);
|
|
||||||
if ( y) *y -= statusY;
|
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user