diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c index 557b9c2..ef45015 100644 --- a/xfce4-notifyd/xfce-notify-window.c +++ b/xfce4-notifyd/xfce-notify-window.c @@ -39,6 +39,7 @@ #define FADE_CHANGE_TIMEOUT 50 #define DEFAULT_RADIUS 10.0 #define DEFAULT_BORDER_WIDTH 2.0 +#define DEFAULT_PADDING 14.0 #define BORDER 6 struct _XfceNotifyWindow @@ -175,6 +176,13 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass) 0.0, 8.0, DEFAULT_BORDER_WIDTH, G_PARAM_READABLE)); + gtk_widget_class_install_style_property(widget_class, + g_param_spec_double("padding", + "padding", + "the padding of the text/icon to the notification's border", + 0.0, 30.0, + DEFAULT_PADDING, + G_PARAM_READABLE)); } static void @@ -182,7 +190,7 @@ xfce_notify_window_init(XfceNotifyWindow *window) { GdkScreen *screen; GtkWidget *tophbox, *align, *vbox; - gdouble border_radius = DEFAULT_RADIUS; + gdouble padding = DEFAULT_PADDING; window->expire_timeout = DEFAULT_EXPIRE_TIMEOUT; window->normal_opacity = DEFAULT_NORMAL_OPACITY; @@ -211,11 +219,11 @@ xfce_notify_window_init(XfceNotifyWindow *window) gtk_widget_ensure_style(GTK_WIDGET(window)); gtk_widget_style_get(GTK_WIDGET(window), - "border-radius", &border_radius, + "padding", &padding, NULL); tophbox = gtk_hbox_new(FALSE, BORDER); - gtk_container_set_border_width(GTK_CONTAINER(tophbox), border_radius + 4); + gtk_container_set_border_width(GTK_CONTAINER(tophbox), padding); gtk_widget_show(tophbox); gtk_container_add(GTK_CONTAINER(window), tophbox);