X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abdeb9e7006488bf917d90048fcd0cbe22f44a71..5cb598ae2014330aaecbd19b8bbe41df2ad61911:/src/gtk1/radiobox.cpp diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 37c9f529f2..a2f712302d 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -286,6 +286,7 @@ wxSize wxRadioBox::DoGetBestSize() const if (req.width > size.x) size.x = req.width; + CacheBestSize(size); return size; } @@ -681,19 +682,17 @@ void wxRadioBox::GtkEnableEvents() } } -void wxRadioBox::ApplyWidgetStyle() +void wxRadioBox::DoApplyWidgetStyle(GtkRcStyle *style) { - SetWidgetStyle(); - - gtk_widget_set_style( m_widget, m_widgetStyle ); + gtk_widget_modify_style( m_widget, style ); wxList::compatibility_iterator node = m_boxes.GetFirst(); while (node) { GtkWidget *widget = GTK_WIDGET( node->GetData() ); - gtk_widget_set_style( widget, m_widgetStyle ); - gtk_widget_set_style( BUTTON_CHILD(node->GetData()), m_widgetStyle ); + gtk_widget_modify_style( widget, style ); + gtk_widget_modify_style( BUTTON_CHILD(node->GetData()), style ); node = node->GetNext(); } @@ -752,5 +751,16 @@ void wxRadioBox::OnInternalIdle() } } +// static +wxVisualAttributes +wxRadioBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + wxVisualAttributes attr; + GtkWidget* widget = gtk_radio_button_new_with_label(NULL, ""); + attr = GetDefaultAttributesFromGTKWidget(widget); + gtk_widget_destroy(widget); + return attr; +} + #endif // wxUSE_RADIOBOX