#include "wx/fontutil.h" // for wxNativeFontInfo
#include "wx/gtk/private.h"
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-
// ============================================================================
// implementation
// ============================================================================
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))
m_widget = gtk_font_button_new();
// set initial font
- m_selectedFont = initial;
+ m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
UpdateFont();
// honour the fontbutton styles
m_parent->DoAddChild( this );
PostCreation(size);
- SetBestSize(size);
+ SetInitialSize(size);
}
else
return wxGenericFontButton::Create(parent, id, initial, pos, size,