From: Václav Slavík Date: Thu, 7 Sep 2006 16:11:03 +0000 (+0000) Subject: use GetCharHeight in GetHeight() instead of creating temporary wxClientDC X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3083f142d9bf66027c0ef2f697ddc04e8daacaa3 use GetCharHeight in GetHeight() instead of creating temporary wxClientDC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/statusbr.cpp b/src/univ/statusbr.cpp index 07d4b25a75..7842693db5 100644 --- a/src/univ/statusbr.cpp +++ b/src/univ/statusbr.cpp @@ -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