fixed GTK styles handling:

1. don't modify the style unless something changed
2. use gtk_widget_modify_style instead of gtk_widget_set_style, the latter is not recommended by GTK+ developers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-06-14 17:34:00 +00:00
parent fae763d088
commit f40fdaa339
82 changed files with 294 additions and 608 deletions

View File

@@ -681,19 +681,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();
}