Bug 982964 - [gtk3] Combo boxes have white text. r=karlt
authorMartin Stransky <stransky@redhat.com>
Wed, 02 Apr 2014 11:47:55 -0400
changeset 195226 a288dcaadcccc83239aeb008b2d81812f35471cd
parent 195225 69ea6095a7aa4d1a4ff3bbb7cb9610f75cbe095f
child 195227 4aa9183846c6408e4b97f1b1d32071d8a82d59e6
push idunknown
push userunknown
push dateunknown
reviewerskarlt
bugs982964
milestone31.0a1
Bug 982964 - [gtk3] Combo boxes have white text. r=karlt
widget/gtk/nsLookAndFeel.cpp
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -1025,26 +1025,31 @@ nsLookAndFeel::Init()
 
     g_object_unref(menu);
 #endif
 
     // button styles
     GtkWidget *parent = gtk_fixed_new();
     GtkWidget *button = gtk_button_new();
     GtkWidget *label = gtk_label_new("M");
+#if (MOZ_WIDGET_GTK == 2)
     GtkWidget *combobox = gtk_combo_box_new();
     GtkWidget *comboboxLabel = gtk_label_new("M");
+    gtk_container_add(GTK_CONTAINER(combobox), comboboxLabel);
+#else
+    GtkWidget *combobox = gtk_combo_box_new_with_entry();
+    GtkWidget *comboboxLabel = gtk_bin_get_child(GTK_BIN(combobox));
+#endif
     GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
     GtkWidget *treeView = gtk_tree_view_new();
     GtkWidget *linkButton = gtk_link_button_new("http://example.com/");
     GtkWidget *menuBar = gtk_menu_bar_new();
     GtkWidget *entry = gtk_entry_new();
 
     gtk_container_add(GTK_CONTAINER(button), label);
-    gtk_container_add(GTK_CONTAINER(combobox), comboboxLabel);
     gtk_container_add(GTK_CONTAINER(parent), button);
     gtk_container_add(GTK_CONTAINER(parent), treeView);
     gtk_container_add(GTK_CONTAINER(parent), linkButton);
     gtk_container_add(GTK_CONTAINER(parent), combobox);
     gtk_container_add(GTK_CONTAINER(parent), menuBar);
     gtk_container_add(GTK_CONTAINER(window), parent);
     gtk_container_add(GTK_CONTAINER(parent), entry);