[gtk+/wip/colorchooser-v2: 70/77] color-editor: don't use an alignment to give the popup extra space
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/colorchooser-v2: 70/77] color-editor: don't use an alignment to give the popup extra space
- Date: Thu, 9 Feb 2012 21:32:12 +0000 (UTC)
commit 6b4ffcc8789176d91a9576f1485e04fb278e9c1c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Feb 9 14:06:43 2012 -0500
color-editor: don't use an alignment to give the popup extra space
gtk/gtkcoloreditor.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c
index 9939115..bcf4757 100644
--- a/gtk/gtkcoloreditor.c
+++ b/gtk/gtkcoloreditor.c
@@ -375,7 +375,6 @@ gtk_color_editor_init (GtkColorEditor *editor)
{
GtkWidget *grid;
GtkWidget *slider;
- GtkWidget *alignment;
GtkWidget *entry;
GtkWidget *swatch;
GtkAdjustment *h_adj, *s_adj, *v_adj, *a_adj;
@@ -448,16 +447,15 @@ gtk_color_editor_init (GtkColorEditor *editor)
gtk_grid_attach (GTK_GRID (grid), editor->priv->sv_plane, 1, 1, 2, 1);
gtk_grid_attach (GTK_GRID (grid), editor->priv->a_slider, 1, 2, 2, 1);
- /* This extra alignment is necessary so we have room to the sides
+ /* This extra margin is necessary so we have room to the sides
* to place the popups as desired
*/
- alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 30, 30);
- gtk_container_add (GTK_CONTAINER (alignment), grid);
+ gtk_widget_set_margin_left (grid, 30);
+ gtk_widget_set_margin_right (grid, 30);
editor->priv->overlay = gtk_overlay_new ();
gtk_widget_override_background_color (editor->priv->overlay, 0, &transparent);
- gtk_container_add (GTK_CONTAINER (editor->priv->overlay), alignment);
+ gtk_container_add (GTK_CONTAINER (editor->priv->overlay), grid);
/* Construct the sv popup */
editor->priv->s_entry = entry = gtk_spin_button_new (scaled_adjustment (s_adj, 100), 1, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]