]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
GTK Combobox and Listbox aren't realized until actually
[wxWidgets.git] / src / gtk1 / combobox.cpp
index acf403570b26e2d311fe1b1a4032098750122294..557d3e1b5dab71cae59a5b56d92edb17f29ae689 100644 (file)
@@ -238,8 +238,17 @@ int wxComboBox::DoAppend( const wxString &item )
     {
         gtk_widget_realize( list_item );
         gtk_widget_realize( GTK_BIN(list_item)->child );
+    }
 
-        ApplyWidgetStyle();
+    // Apply current widget style to the new list_item
+    GtkRcStyle *style = CreateWidgetStyle();
+    if (style)
+    {
+        gtk_widget_modify_style( GTK_WIDGET( list_item ), style );
+        GtkBin *bin = GTK_BIN( list_item );
+        GtkWidget *label = GTK_WIDGET( bin->child );
+        gtk_widget_modify_style( label, style );
+        gtk_rc_style_unref( style );
     }
 
     gtk_widget_show( list_item );