]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/font.cpp
Propagate the event handling fixes to wxVarScrollHelperBase.
[wxWidgets.git] / src / gtk / font.cpp
index f2e48c3ca89856a52ea9dbd92f5b79c76dd181d0..734b7221c0136dac421777679b5ef7fbad46cf0e 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/font.cpp
 // Purpose:     wxFont for wxGTK
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -278,18 +277,20 @@ wxFont::wxFont(const wxNativeFontInfo& info)
         SetStrikethrough(true);
 }
 
-wxFont::wxFont(int pointSize,
-               wxFontFamily family,
-               int flags,
-               const wxString& face,
-               wxFontEncoding encoding)
+wxFont::wxFont(const wxFontInfo& info)
 {
-    m_refData = new wxFontRefData(pointSize, family,
-                                  GetStyleFromFlags(flags),
-                                  GetWeightFromFlags(flags),
-                                  GetUnderlinedFromFlags(flags),
-                                  GetStrikethroughFromFlags(flags),
-                                  face, encoding);
+    m_refData = new wxFontRefData(info.GetPointSize(),
+                                  info.GetFamily(),
+                                  info.GetStyle(),
+                                  info.GetWeight(),
+                                  info.IsUnderlined(),
+                                  info.IsStrikethrough(),
+                                  info.GetFaceName(),
+                                  info.GetEncoding());
+
+    wxSize pixelSize = info.GetPixelSize();
+    if ( pixelSize != wxDefaultSize )
+        SetPixelSize(pixelSize);
 }
 
 bool wxFont::Create( int pointSize,