diff options
author | raveit65 <[email protected]> | 2017-05-08 17:01:06 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-05-28 09:52:32 +0200 |
commit | 092843c1fb4295025ead4008f9463df70dd9328b (patch) | |
tree | 1cbdf18ded8f7797fcec9c77cf8df51d3a70ee4f | |
parent | 05461ec1fb5738823be95973391d01ff513a2997 (diff) | |
download | mate-control-center-092843c1fb4295025ead4008f9463df70dd9328b.tar.bz2 mate-control-center-092843c1fb4295025ead4008f9463df70dd9328b.tar.xz |
libslab slab-section: avoid deprecated GtkAlignment
-rw-r--r-- | libslab/slab-section.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libslab/slab-section.c b/libslab/slab-section.c index af1443bf..fec9634d 100644 --- a/libslab/slab-section.c +++ b/libslab/slab-section.c @@ -119,7 +119,6 @@ GtkWidget * slab_section_new_with_markup (const gchar * title_markup, SlabStyle style) { SlabSection *section; - GtkWidget *align; gchar * widget_theming_name; section = g_object_new (SLAB_SECTION_TYPE, NULL); @@ -129,25 +128,23 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style) section->style = style; section->selected = FALSE; - align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); + section->childbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 10)); switch (style) { case Style1: - gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 0, 0); widget_theming_name = "slab_section_style1"; break; case Style2: - gtk_alignment_set_padding (GTK_ALIGNMENT (align), SLAB_TOP_PADDING, - SLAB_BOTTOM_PADDING, SLAB_LEFT_PADDING, 0); + gtk_widget_set_margin_top (GTK_WIDGET (section->childbox), SLAB_TOP_PADDING); + gtk_widget_set_margin_bottom (GTK_WIDGET (section->childbox), SLAB_BOTTOM_PADDING); + gtk_widget_set_margin_start (GTK_WIDGET (section->childbox), SLAB_LEFT_PADDING); + gtk_widget_set_margin_end (GTK_WIDGET (section->childbox), 0); widget_theming_name = "slab_section_style2"; break; default: g_assert_not_reached (); } - gtk_box_pack_start (GTK_BOX (section), align, TRUE, TRUE, 0); - - section->childbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 10)); - gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (section->childbox)); + gtk_box_pack_start (GTK_BOX (section), GTK_WIDGET (section->childbox), TRUE, TRUE, 0); section->title = gtk_label_new (title_markup); gtk_label_set_use_markup (GTK_LABEL (section->title), TRUE); |