Commit 885f6615 authored by Michael Natterer's avatar Michael Natterer 😴

app: kill all except one GtkAlignment, the tag popup one is a bit tricky

parent c2763afd
......@@ -113,7 +113,6 @@ resize_dialog_new (GimpViewable *viewable,
GtkWidget *dialog;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkWidget *abox;
GtkWidget *frame;
GtkWidget *button;
GtkWidget *spinbutton;
......@@ -276,13 +275,10 @@ resize_dialog_new (GimpViewable *viewable,
G_CALLBACK (offset_center_clicked),
private);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
gtk_widget_show (abox);
frame = gtk_frame_new (NULL);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
private->area = gimp_offset_area_new (width, height);
......
......@@ -116,7 +116,6 @@ layer_select_new (GimpDisplayShell *shell,
GtkWidget *frame1;
GtkWidget *frame2;
GtkWidget *hbox;
GtkWidget *alignment;
layer_select = g_slice_new0 (LayerSelect);
......@@ -151,11 +150,7 @@ layer_select_new (GimpDisplayShell *shell,
gtk_container_add (GTK_CONTAINER (frame2), hbox);
gtk_widget_show (hbox);
/* The view */
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
gtk_widget_show (alignment);
/* the view */
layer_select->view =
gimp_view_new_by_types (gimp_get_user_context (image->gimp),
GIMP_TYPE_VIEW,
......@@ -165,9 +160,8 @@ layer_select_new (GimpDisplayShell *shell,
gimp_display_shell_get_color_config (shell));
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
GIMP_VIEWABLE (layer));
gtk_container_add (GTK_CONTAINER (alignment), layer_select->view);
gtk_box_pack_start (GTK_BOX (hbox), layer_select->view, FALSE, FALSE, 0);
gtk_widget_show (layer_select->view);
gtk_widget_show (alignment);
/* the layer name label */
layer_select->label = gtk_label_new (gimp_object_get_name (layer));
......
......@@ -145,16 +145,12 @@ static void
gimp_buffer_source_box_constructed (GObject *object)
{
GimpBufferSourceBox *box = GIMP_BUFFER_SOURCE_BOX (object);
GtkWidget *alignment;
alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (box), alignment, FALSE, FALSE, 0);
gtk_widget_show (alignment);
box->priv->toggle = gtk_check_button_new_with_mnemonic (box->priv->name);
gtk_widget_set_valign (box->priv->toggle, GTK_ALIGN_CENTER);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (box->priv->toggle),
box->priv->enabled);
gtk_container_add (GTK_CONTAINER (alignment), box->priv->toggle);
gtk_box_pack_start (GTK_BOX (box), box->priv->toggle, FALSE, FALSE, 0);
gtk_widget_show (box->priv->toggle);
g_signal_connect_object (box->priv->toggle, "toggled",
......
......@@ -645,57 +645,63 @@ static GtkWidget *
toolbox_create_color_area (GimpToolbox *toolbox,
GimpContext *context)
{
GtkWidget *alignment;
GtkWidget *col_area;
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (alignment), 2);
gimp_help_set_help_data (alignment, NULL, GIMP_HELP_TOOLBOX_COLOR_AREA);
col_area = gimp_toolbox_color_area_create (toolbox, 54, 42);
gtk_container_add (GTK_CONTAINER (alignment), col_area);
gtk_widget_show (col_area);
return alignment;
g_object_set (col_area,
"halign", GTK_ALIGN_CENTER,
"valign", GTK_ALIGN_CENTER,
"margin-left", 2,
"margin-right", 2,
"margin-top", 2,
"margin-bottom", 2,
NULL);
gimp_help_set_help_data (col_area, NULL, GIMP_HELP_TOOLBOX_COLOR_AREA);
return col_area;
}
static GtkWidget *
toolbox_create_foo_area (GimpToolbox *toolbox,
GimpContext *context)
{
GtkWidget *alignment;
GtkWidget *foo_area;
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (alignment), 2);
gimp_help_set_help_data (alignment, NULL, GIMP_HELP_TOOLBOX_INDICATOR_AREA);
foo_area = gimp_toolbox_indicator_area_create (toolbox);
gtk_container_add (GTK_CONTAINER (alignment), foo_area);
gtk_widget_show (foo_area);
return alignment;
g_object_set (foo_area,
"halign", GTK_ALIGN_CENTER,
"valign", GTK_ALIGN_CENTER,
"margin-left", 2,
"margin-right", 2,
"margin-top", 2,
"margin-bottom", 2,
NULL);
gimp_help_set_help_data (foo_area, NULL, GIMP_HELP_TOOLBOX_INDICATOR_AREA);
return foo_area;
}
static GtkWidget *
toolbox_create_image_area (GimpToolbox *toolbox,
GimpContext *context)
{
GtkWidget *alignment;
GtkWidget *image_area;
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (alignment), 2);
gimp_help_set_help_data (alignment, NULL, GIMP_HELP_TOOLBOX_IMAGE_AREA);
image_area = gimp_toolbox_image_area_create (toolbox, 52, 42);
gtk_container_add (GTK_CONTAINER (alignment), image_area);
gtk_widget_show (image_area);
return alignment;
g_object_set (image_area,
"halign", GTK_ALIGN_CENTER,
"valign", GTK_ALIGN_CENTER,
"margin-left", 2,
"margin-right", 2,
"margin-top", 2,
"margin-bottom", 2,
NULL);
gimp_help_set_help_data (image_area, NULL, GIMP_HELP_TOOLBOX_IMAGE_AREA);
return image_area;
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment