X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c757b5fee093bbc3686f1e474316396b742fb888..57f2a6529245d54274a4c56469f1828a6f8fd497:/src/gtk/fontpicker.cpp diff --git a/src/gtk/fontpicker.cpp b/src/gtk/fontpicker.cpp index 27d8bb19bf..6719a53aa9 100644 --- a/src/gtk/fontpicker.cpp +++ b/src/gtk/fontpicker.cpp @@ -60,8 +60,6 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id, { if (!gtk_check_version(2,4,0)) { - m_needParent = true; - if (!PreCreation( parent, pos, size ) || !wxControl::CreateBase(parent, id, pos, size, style, validator, name)) { @@ -72,7 +70,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 @@ -84,7 +82,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id, gtk_font_button_set_use_size(GTK_FONT_BUTTON(m_widget), usefont); gtk_font_button_set_use_font(GTK_FONT_BUTTON(m_widget), usefont); - gtk_widget_show( GTK_WIDGET(m_widget) ); + gtk_widget_show(m_widget); // GtkFontButton signals g_signal_connect(m_widget, "font-set", @@ -94,7 +92,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,