Font correction

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-02-20 16:41:49 +00:00
parent 64f553a486
commit 008881c3f0

View File

@ -129,7 +129,11 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const
wxSize wxStaticText::DoGetBestSize() const wxSize wxStaticText::DoGetBestSize() const
{ {
wxClientDC dc(wx_const_cast(wxStaticText *, this)); wxClientDC dc(wx_const_cast(wxStaticText *, this));
dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); wxFont font(GetFont());
if (!font.Ok())
font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
dc.SetFont(font);
wxCoord widthTextMax, heightTextTotal; wxCoord widthTextMax, heightTextTotal;
dc.GetMultiLineTextExtent(GetLabel(), &widthTextMax, &heightTextTotal); dc.GetMultiLineTextExtent(GetLabel(), &widthTextMax, &heightTextTotal);