X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c757b5fee093bbc3686f1e474316396b742fb888..e678981e9a19bbba85d4ee9eb9bae5cb2fab7483:/src/gtk/fontpicker.cpp diff --git a/src/gtk/fontpicker.cpp b/src/gtk/fontpicker.cpp index 27d8bb19bf..bc24c2e8d8 100644 --- a/src/gtk/fontpicker.cpp +++ b/src/gtk/fontpicker.cpp @@ -61,6 +61,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id, if (!gtk_check_version(2,4,0)) { m_needParent = true; + m_acceptsFocus = true; if (!PreCreation( parent, pos, size ) || !wxControl::CreateBase(parent, id, pos, size, style, validator, name)) @@ -72,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 @@ -94,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,