]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
set click coordinates to (-1, -1) if right mouse button event was generated from...
[wxWidgets.git] / src / gtk1 / combobox.cpp
index 2ddf6fcf952de835d301dc5fd95f43bcaf2678d0..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 );
@@ -773,6 +782,8 @@ wxSize wxComboBox::DoGetBestSize() const
     // empty combobox should have some reasonable default size too
     if ( ret.x < 100 )
         ret.x = 100;
+
+    CacheBestSize(ret);
     return ret;
 }