From 7f44feab194c512e81ae263d09e65869d54c0fc4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Feb 2012 20:21:10 -0500 Subject: [PATCH] Fix use_alpha initialization and propagation We must set use_alpha to TRUE initially, and when passing it down to the swatches, we must iterate over the custom box, too. --- gtk/gtkcolorchooserwidget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c index 10d29c27c3..dc48c18ee2 100644 --- a/gtk/gtkcolorchooserwidget.c +++ b/gtk/gtkcolorchooserwidget.c @@ -224,7 +224,7 @@ gtk_color_chooser_widget_set_use_alpha (GtkColorChooserWidget *cc, { grid = p->data; - if (!GTK_IS_GRID (grid)) + if (!GTK_IS_CONTAINER (grid)) continue; children = gtk_container_get_children (GTK_CONTAINER (grid)); @@ -399,6 +399,8 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc) cc->priv = G_TYPE_INSTANCE_GET_PRIVATE (cc, GTK_TYPE_COLOR_CHOOSER_WIDGET, GtkColorChooserWidgetPrivate); + cc->priv->use_alpha = TRUE; + gtk_orientable_set_orientation (GTK_ORIENTABLE (cc), GTK_ORIENTATION_VERTICAL); cc->priv->palette = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (cc), cc->priv->palette);