]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/font.cpp
wxMSW: return correct value from wxMessageDialog::GetReturnCode().
[wxWidgets.git] / src / msw / font.cpp
index b0e73148cbd842f02ba35b1f7e20702c51b7ef65..bbf7d849a6a33566b26488e2fc2f8c5602606f5d 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -804,18 +803,18 @@ wxFont::wxFont(const wxString& fontdesc)
         (void)Create(info);
 }
 
-wxFont::wxFont(int pointSize,
-               wxFontFamily family,
-               int flags,
-               const wxString& face,
-               wxFontEncoding encoding)
+wxFont::wxFont(const wxFontInfo& info)
 {
-    m_refData = new wxFontRefData(pointSize, wxDefaultSize, false,
-                                  family,
-                                  GetStyleFromFlags(flags),
-                                  GetWeightFromFlags(flags),
-                                  GetUnderlinedFromFlags(flags),
-                                  false, face, encoding);
+    m_refData = new wxFontRefData(info.GetPointSize(),
+                                  info.GetPixelSize(),
+                                  info.IsUsingSizeInPixels(),
+                                  info.GetFamily(),
+                                  info.GetStyle(),
+                                  info.GetWeight(),
+                                  info.IsUnderlined(),
+                                  info.IsStrikethrough(),
+                                  info.GetFaceName(),
+                                  info.GetEncoding());
 }
 
 bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
@@ -841,7 +840,7 @@ bool wxFont::DoCreate(int pointSize,
 
     // wxDEFAULT is a valid value for the font size too so we must treat it
     // specially here (otherwise the size would be 70 == wxDEFAULT value)
-    if ( pointSize == wxDEFAULT )
+    if ( pointSize == wxDEFAULT || pointSize == -1 )
     {
         pointSize = wxNORMAL_FONT->GetPointSize();
     }