summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/themes/slider/theme.c4
-rw-r--r--src/themes/standard/theme.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index 16012a4..eb54509 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -807,7 +807,11 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
update_content_hbox_visibility(windata);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (windata->close_button, NULL, &req);
+#else
gtk_widget_size_request(windata->close_button, &req);
+#endif
/* -1: main_vbox border width
-10: vbox border width
-6: spacing for hbox */
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index 9a69e61..52a6474 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -882,13 +882,21 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
if (body != NULL && *body != '\0')
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (windata->iconbox, NULL, &req);
+#else
gtk_widget_size_request(windata->iconbox, &req);
+#endif
/* -1: border width for
* -6: spacing for hbox */
gtk_widget_set_size_request(windata->body_label, WIDTH - (1 * 2) - (10 * 2) - req.width - 6, -1);
}
- gtk_widget_size_request(windata->close_button, &req);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (windata->close_button, NULL, &req);
+#else
+ gtk_widget_size_request(windata->close_button, &req);
+#endif
/* -1: main_vbox border width
* -10: vbox border width
* -6: spacing for hbox */