- gtk_widget_modify_style(m_widget, style);
- gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
+ GTKApplyStyle(m_widget, style);
+ GtkWidget* child = gtk_bin_get_child(GTK_BIN(m_widget));
+ GTKApplyStyle(child, style);
+
+ // for buttons with images, the path to the label is (at least in 2.12)
+ // GtkButton -> GtkAlignment -> GtkHBox -> GtkLabel
+ if ( GTK_IS_ALIGNMENT(child) )
+ {
+ GtkWidget* box = gtk_bin_get_child(GTK_BIN(child));
+ if ( GTK_IS_BOX(box) )
+ {
+ wxGtkList list(gtk_container_get_children(GTK_CONTAINER(box)));
+ for (GList* item = list; item; item = item->next)
+ {
+ GTKApplyStyle(GTK_WIDGET(item->data), style);
+ }
+ }
+ }