Changed AppendCommon (called by all Append methods) so it doesn't
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
This commit is contained in:
@@ -518,7 +518,14 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
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
|
||||
@@ -994,4 +1001,4 @@ void wxListBox::ApplyWidgetStyle()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user