Commit 6686a791 authored by Rui Matos's avatar Rui Matos
Browse files

region: Fix deprecated API usage

https://bugzilla.gnome.org/show_bug.cgi?id=740986
parent 54227dc2
......@@ -270,7 +270,6 @@ more_widget_new (void)
gtk_style_context_add_class (gtk_widget_get_style_context (arrow), "dim-label");
gtk_widget_set_margin_top (box, 10);
gtk_widget_set_margin_bottom (box, 10);
gtk_misc_set_alignment (GTK_MISC (arrow), 0.5, 0.5);
gtk_box_pack_start (GTK_BOX (box), arrow, TRUE, TRUE, 0);
return GTK_LIST_BOX_ROW (row);
......
......@@ -119,14 +119,14 @@ padded_label_new (const gchar *text,
GtkWidget *widget;
GtkWidget *label;
GtkWidget *arrow;
gdouble alignment;
GtkAlign alignment;
if (position == ROW_LABEL_POSITION_START)
alignment = 0.0;
alignment = GTK_ALIGN_START;
else if (position == ROW_LABEL_POSITION_CENTER)
alignment = 0.5;
alignment = GTK_ALIGN_CENTER;
else
alignment = 1.0;
alignment = GTK_ALIGN_END;
widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
......@@ -137,7 +137,7 @@ padded_label_new (const gchar *text,
}
label = gtk_label_new (text);
gtk_misc_set_alignment (GTK_MISC (label), alignment, 0.5);
gtk_widget_set_halign (label, alignment);
set_row_widget_margins (label);
gtk_box_pack_start (GTK_BOX (widget), label, TRUE, TRUE, 0);
if (dim_label)
......@@ -167,7 +167,6 @@ more_row_new (void)
arrow = gtk_image_new_from_icon_name ("view-more-symbolic", GTK_ICON_SIZE_MENU);
gtk_style_context_add_class (gtk_widget_get_style_context (arrow), "dim-label");
set_row_widget_margins (arrow);
gtk_misc_set_alignment (GTK_MISC (arrow), 0.5, 0.5);
gtk_box_pack_start (GTK_BOX (box), arrow, TRUE, TRUE, 0);
return GTK_LIST_BOX_ROW (row);
......
......@@ -824,7 +824,7 @@ add_input_row (CcRegionPanel *self,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (row), box);
label = gtk_label_new (name);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_margin_start (label, 20);
gtk_widget_set_margin_end (label, 20);
gtk_widget_set_margin_top (label, 6);
......
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