// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
return TRUE;
}
-void wxRadioButton::ApplyWidgetStyle()
+void wxRadioButton::DoApplyWidgetStyle(GtkRcStyle *style)
{
- SetWidgetStyle();
- gtk_widget_set_style( m_widget, m_widgetStyle );
- gtk_widget_set_style( BUTTON_CHILD(m_widget), m_widgetStyle );
+ gtk_widget_modify_style(m_widget, style);
+ gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
}
bool wxRadioButton::IsOwnGtkWindow( GdkWindow *window )
wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
attr = GetDefaultAttributesFromGTKWidget(widget);
- gtk_widget_destroy(widget);
+ gtk_widget_destroy(wnd);
return attr;
}