X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a65ffcb229be96bbea86808bab3b1239407e8d9a..2e61f6814126617f286fad69f614cccd86db6412:/src/gtk/fontpicker.cpp?ds=sidebyside diff --git a/src/gtk/fontpicker.cpp b/src/gtk/fontpicker.cpp index 88e2b93c7c..97102051c8 100644 --- a/src/gtk/fontpicker.cpp +++ b/src/gtk/fontpicker.cpp @@ -61,7 +61,6 @@ 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)) @@ -73,7 +72,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 +94,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,