call ApplyWidgetStyle (which applies the current style to all list_items,
which should already have the right style), but instead only applies
the style to the new list_item. This results in a *great* speedup for large
listboxes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3659
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
gtk_widget_realize( list_item );
gtk_widget_realize( GTK_BIN(list_item)->child );
- if (m_widgetStyle) ApplyWidgetStyle();
+ //if (m_widgetStyle) ApplyWidgetStyle();
+ if (m_widgetStyle) {
+ // Apply current widget style to the new list_item
+ gtk_widget_set_style( GTK_WIDGET( list_item ), m_widgetStyle );
+ GtkBin *bin = GTK_BIN( list_item );
+ GtkWidget *label = GTK_WIDGET( bin->child );
+ gtk_widget_set_style( label, m_widgetStyle );
+ }
#if wxUSE_DRAG_AND_DROP
#ifndef NEW_GTK_DND_CODE
}
}
-#endif
\ No newline at end of file
+#endif
gtk_widget_realize( list_item );
gtk_widget_realize( GTK_BIN(list_item)->child );
- if (m_widgetStyle) ApplyWidgetStyle();
+ //if (m_widgetStyle) ApplyWidgetStyle();
+ if (m_widgetStyle) {
+ // Apply current widget style to the new list_item
+ gtk_widget_set_style( GTK_WIDGET( list_item ), m_widgetStyle );
+ GtkBin *bin = GTK_BIN( list_item );
+ GtkWidget *label = GTK_WIDGET( bin->child );
+ gtk_widget_set_style( label, m_widgetStyle );
+ }
#if wxUSE_DRAG_AND_DROP
#ifndef NEW_GTK_DND_CODE
}
}
-#endif
\ No newline at end of file
+#endif