[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Further improvement to button layout in notification windows
noreply at xfce.org
noreply at xfce.org
Sun Oct 29 00:08:21 CEST 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit 0d0811de498a7c5eb3c4ab67185517f4b47ebbcc
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Oct 29 00:06:21 2017 +0200
Further improvement to button layout in notification windows
---
xfce4-notifyd/xfce-notify-window.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index 1a8f56c..994b7ec 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -228,7 +228,7 @@ xfce_notify_window_init(XfceNotifyWindow *window)
"padding", &padding,
NULL);
- topvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, padding / 2);
+ topvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_set_homogeneous (GTK_BOX (topvbox), FALSE);
gtk_container_set_border_width (GTK_CONTAINER(topvbox), padding);
gtk_widget_show (topvbox);
@@ -974,6 +974,7 @@ xfce_notify_window_set_actions(XfceNotifyWindow *window,
const gchar *cur_button_text = actions[i+1];
GtkWidget *btn, *lbl;
gchar *cur_button_text_escaped;
+ gdouble padding;
if(!cur_button_text || !cur_action_id || !*cur_action_id)
break;
@@ -985,11 +986,15 @@ xfce_notify_window_set_actions(XfceNotifyWindow *window,
if (g_strcmp0 (cur_button_text, "") == 0)
continue;
+ gtk_widget_style_get(GTK_WIDGET(window),
+ "padding", &padding,
+ NULL);
btn = gtk_button_new();
g_object_set_data_full(G_OBJECT(btn), "--action-id",
g_strdup(cur_action_id),
(GDestroyNotify)g_free);
gtk_widget_show(btn);
+ gtk_widget_set_margin_top (btn, padding / 2);
gtk_container_add(GTK_CONTAINER(window->button_box), btn);
g_signal_connect(G_OBJECT(btn), "clicked",
G_CALLBACK(xfce_notify_window_button_clicked),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list