summaryrefslogtreecommitdiff
path: root/libslab/slab-section.c
diff options
context:
space:
mode:
Diffstat (limited to 'libslab/slab-section.c')
-rw-r--r--libslab/slab-section.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libslab/slab-section.c b/libslab/slab-section.c
index c03f0c94..d7dd978c 100644
--- a/libslab/slab-section.c
+++ b/libslab/slab-section.c
@@ -20,7 +20,7 @@
#include "slab-section.h"
-G_DEFINE_TYPE (SlabSection, slab_section, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (SlabSection, slab_section, GTK_TYPE_BOX)
static void slab_section_finalize (GObject *);
@@ -123,6 +123,7 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style)
gchar * widget_theming_name;
section = g_object_new (SLAB_SECTION_TYPE, NULL);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (section), GTK_ORIENTATION_VERTICAL);
gtk_box_set_homogeneous (GTK_BOX (section), FALSE);
gtk_box_set_spacing (GTK_BOX (section), 0);
section->style = style;
@@ -145,7 +146,11 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style)
}
gtk_box_pack_start (GTK_BOX (section), align, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ section->childbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 10));
+#else
section->childbox = GTK_BOX (gtk_vbox_new (FALSE, 10));
+#endif
gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (section->childbox));
section->title = gtk_label_new (title_markup);