X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f8845289521c7f53e95b6dfd8275daab8b05639..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/gtk1/radiobox.cpp?ds=sidebyside diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index a2f712302d..f5779a8936 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -686,6 +686,10 @@ void wxRadioBox::DoApplyWidgetStyle(GtkRcStyle *style) { gtk_widget_modify_style( m_widget, style ); +#ifdef __WXGTK20__ + gtk_widget_modify_style(GTK_FRAME(m_widget)->label_widget, style); +#endif + wxList::compatibility_iterator node = m_boxes.GetFirst(); while (node) { @@ -756,9 +760,12 @@ wxVisualAttributes wxRadioBox::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; }