X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a81258bee4e20d3fa9b3d2f6bf3bcd1200d1e5e0..e487524e492809638b7e335937c41fd432458a54:/src/gtk1/radiobut.cpp?ds=sidebyside diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index a08d452336..e42dcfd56b 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -60,8 +60,15 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); + m_parent->AddChild( this ); + + (m_parent->m_insertCallback)( m_parent, this ); + PostCreation(); + SetBackgroundColour( parent->GetBackgroundColour() ); + SetForegroundColour( parent->GetForegroundColour() ); + Show( TRUE ); return TRUE; @@ -100,23 +107,11 @@ void wxRadioButton::Enable( bool enable ) gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable ); } -void wxRadioButton::SetFont( const wxFont &font ) +void wxRadioButton::ApplyWidgetStyle() { - wxCHECK_RET( m_widget != NULL, "invalid radiobutton" ); - - wxControl::SetFont( font ); - + SetWidgetStyle(); + gtk_widget_set_style( m_widget, m_widgetStyle ); gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle ); } -void wxRadioButton::SetBackgroundColour( const wxColour &colour ) -{ - wxCHECK_RET( m_widget != NULL, "invalid radiobutton" ); - - wxControl::SetBackgroundColour( colour ); - - if (!m_backgroundColour.Ok()) return; - - gtk_widget_set_style( m_widget, m_widgetStyle ); -}