use GetCharHeight in GetHeight() instead of creating temporary wxClientDC
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 7 Sep 2006 16:11:03 +0000 (16:11 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 7 Sep 2006 16:11:03 +0000 (16:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/statusbr.cpp

index 07d4b25a753f47807f91dfcf77db9c9f4426d5c8..7842693db506c9245019640f8ec56e6947f44833 100644 (file)
@@ -289,10 +289,7 @@ wxRect wxStatusBarUniv::DoGetFieldRect(int n) const
 
 wxCoord wxStatusBarUniv::GetHeight() const
 {
-    wxClientDC dc(wxConstCast(this, wxStatusBarUniv));
-    dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
-
-    return dc.GetCharHeight() + 2*GetBorderY();
+    return GetCharHeight() + 2*GetBorderY();
 }
 
 wxSize wxStatusBarUniv::DoGetBestSize() const