summaryrefslogtreecommitdiff
path: root/libslab/directory-tile.c
diff options
context:
space:
mode:
Diffstat (limited to 'libslab/directory-tile.c')
-rw-r--r--libslab/directory-tile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libslab/directory-tile.c b/libslab/directory-tile.c
index 272d0587..f8a57cfb 100644
--- a/libslab/directory-tile.c
+++ b/libslab/directory-tile.c
@@ -342,7 +342,12 @@ create_header (const gchar *name)
header = gtk_label_new (name);
gtk_label_set_ellipsize (GTK_LABEL (header), PANGO_ELLIPSIZE_END);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (header, GTK_ALIGN_START);
+ gtk_widget_set_valign (header, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
+#endif
header_bin = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
gtk_container_add (GTK_CONTAINER (header_bin), header);
@@ -409,7 +414,12 @@ rename_entry_activate_cb (GtkEntry *entry, gpointer user_data)
g_object_unref (dst_file);
header = gtk_label_new (priv->basename);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (header, GTK_ALIGN_START);
+ gtk_widget_set_valign (header, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
+#endif
child = gtk_bin_get_child (priv->header_bin);