X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe161a2685012cf90bb5bfe95f2260aee71d8ad7..645b5bd6c0bc43c1029bcaeed32f34db063a3739:/src/gtk/radiobox.cpp diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index f0af2b64a5..f5779a8936 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -286,6 +286,7 @@ wxSize wxRadioBox::DoGetBestSize() const if (req.width > size.x) size.x = req.width; + CacheBestSize(size); return size; } @@ -540,8 +541,6 @@ void wxRadioBox::SetLabel( const wxString& label ) wxControl::SetLabel( label ); gtk_frame_set_label( GTK_FRAME(m_widget), wxGTK_CONV( wxControl::GetLabel() ) ); - - PostSetLabel(); } void wxRadioBox::SetString( int item, const wxString& label ) @@ -687,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) { @@ -757,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; }