]> git.saurik.com Git - wxWidgets.git/commitdiff
Font correction
authorJulian Smart <julian@anthemion.co.uk>
Sun, 20 Feb 2005 16:41:49 +0000 (16:41 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 20 Feb 2005 16:41:49 +0000 (16:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/stattext.cpp

index 89538fc88481e375411f2eb4ad5b7ac9796499b1..124d9e471d935eddd112a910b0a6849d9f7c6360 100644 (file)
@@ -129,7 +129,11 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const
 wxSize wxStaticText::DoGetBestSize() const
 {
     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;
     dc.GetMultiLineTextExtent(GetLabel(), &widthTextMax, &heightTextTotal);