summaryrefslogtreecommitdiff
path: root/src/themes/slider/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/slider/theme.c')
-rw-r--r--src/themes/slider/theme.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index 1bb6ecf..dc369a7 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -669,7 +669,12 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
#endif
gtk_widget_show(windata->summary_label);
gtk_box_pack_start(GTK_BOX(vbox), windata->summary_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 15, 2)
+ gtk_label_set_xalign (GTK_LABEL (windata->summary_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (windata->summary_label), 0.0);
+#else
gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0);
+#endif
gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR);
@@ -695,7 +700,12 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
#endif
gtk_widget_show(windata->body_label);
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 15, 2)
+ gtk_label_set_xalign (GTK_LABEL (windata->body_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0);
+#else
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
+#endif
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
@@ -1041,7 +1051,12 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A
#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 15, 2)
+ gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.5);
+#endif
}
label = gtk_label_new(NULL);
@@ -1052,7 +1067,11 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A
#endif
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 15, 2)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+#endif
buf = g_strdup_printf("<small>%s</small>", text);
gtk_label_set_markup(GTK_LABEL(label), buf);
g_free(buf);