]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/statusbr.cpp
create wxSpinCtrl with default pos+size first, so that the subsequent call to DoSetSi...
[wxWidgets.git] / src / univ / statusbr.cpp
index 62f72574581c96efce676a87f43a24bd9578635d..143b6fcde885b2e9967c2dfa01ebdad0bdaec5ca 100644 (file)
@@ -88,6 +88,8 @@ wxRect wxStatusBarUniv::GetTotalFieldRect(wxCoord *borderBetweenFields)
     wxRect rect = GetClientRect();
 
     // no, don't do this - the borders are meant to be inside this rect
+    // wxSize sizeBorders =
+    m_renderer->GetStatusBarBorders(borderBetweenFields);
     //rect.Deflate(sizeBorders.x, sizeBorders.y);
 
     // recalc the field widths if needed
@@ -110,7 +112,7 @@ void wxStatusBarUniv::DoDraw(wxControlRenderer *renderer)
 
     // prepare the DC
     wxDC& dc = renderer->GetDC();
-    dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+    dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
     // do draw the fields
     int flags = IsEnabled() ? 0 : wxCONTROL_DISABLED;
@@ -184,9 +186,8 @@ wxString wxStatusBarUniv::GetStatusText(int number) const
 
 void wxStatusBarUniv::SetFieldsCount(int number, const int *widths)
 {
-    wxStatusBarBase::SetFieldsCount(number, widths);
-
     m_statusText.SetCount(number);
+    wxStatusBarBase::SetFieldsCount(number, widths);
     m_widthsAbs.Empty();
 }
 
@@ -242,7 +243,7 @@ bool wxStatusBarUniv::GetFieldRect(int n, wxRect& rect) const
 wxCoord wxStatusBarUniv::GetHeight() const
 {
     wxClientDC dc(wxConstCast(this, wxStatusBarUniv));
-    dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+    dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
     return dc.GetCharHeight() + 2*GetBorderY();
 }