From 988cbb630076dcbb3e5756d1ff7dc298c369aff6 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 9 Feb 2012 14:25:53 -0500 Subject: [PATCH] color-editor: don't use a GtkAlignment to layout popups Set a margin on the contents and use a box instead. --- gtk/gtkcoloreditor.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index bcf475793a..923c2726c6 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -44,7 +44,6 @@ #include "gtkadjustment.h" #include "gtklabel.h" #include "gtkspinbutton.h" -#include "gtkalignment.h" #include "gtkintl.h" #include @@ -352,14 +351,13 @@ create_popup (GtkColorEditor *editor, { GtkWidget *popup; - popup = gtk_alignment_new (0.5, 0.5, 0, 0); - gtk_alignment_set_padding (GTK_ALIGNMENT (popup), 12, 12, 12, 12); - gtk_style_context_add_class (gtk_widget_get_style_context (popup), GTK_STYLE_CLASS_TOOLTIP); + g_object_set (contents, "margin", 12, NULL); + popup = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_style_context_add_class (gtk_widget_get_style_context (popup), GTK_STYLE_CLASS_TOOLTIP); gtk_container_add (GTK_CONTAINER (popup), contents); - gtk_widget_show_all (popup); - gtk_widget_hide (popup); + gtk_widget_show_all (contents); gtk_widget_set_no_show_all (popup, TRUE); g_signal_connect (popup, "draw", G_CALLBACK (popup_draw), editor);