]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/fontpicker.cpp
add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's...
[wxWidgets.git] / src / gtk / fontpicker.cpp
index 88e2b93c7c5da116e22bacfe521203bc9dd29f72..bc24c2e8d8f337098d48dff73b683aa4e408009e 100644 (file)
@@ -73,7 +73,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         m_widget = gtk_font_button_new();
 
         // set initial font
-        m_selectedFont = initial;
+        m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
         UpdateFont();
 
         // honour the fontbutton styles
@@ -95,7 +95,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         m_parent->DoAddChild( this );
 
         PostCreation(size);
-        SetBestSize(size);
+        SetInitialSize(size);
     }
     else
         return wxGenericFontButton::Create(parent, id, initial, pos, size,