[notification-daemon] Add spacing to stacks



commit 7aa0c8dd29ad1d7e4b2133d412da0f750f1b1103
Author: Alexander Jones <alex weej com>
Date:   Sat Jan 9 10:55:26 2010 -0500

    Add spacing to stacks
    
    Adds a two pixel spacing between bubbles.
    Picked from https://bugs.launchpad.net/ubuntu/+source/notification-daemon/+bug/137095

 src/daemon/stack.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/daemon/stack.c b/src/daemon/stack.c
index b54abfa..ee70d08 100644
--- a/src/daemon/stack.c
+++ b/src/daemon/stack.c
@@ -1,4 +1,5 @@
-/*
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
  * stack.c - Notification stack groups.
  *
  * Copyright (C) 2006 Christian Hammond <chipx86 chipx86 com>
@@ -28,6 +29,8 @@
 #include <X11/Xatom.h>
 #include <gdk/gdkx.h>
 
+#define NOTIFY_STACK_SPACING 2
+
 struct _NotifyStack
 {
 	NotifyDaemon *daemon;
@@ -233,8 +236,8 @@ notify_stack_shift_notifications(NotifyStack *stack,
 			gtk_widget_size_request(GTK_WIDGET(nw2), &req);
 
 			translate_coordinates(stack->location, &workarea, &x, &y,
-								  &shiftx, &shifty, req.width, req.height,
-								  index++);
+					      &shiftx, &shifty, req.width + NOTIFY_STACK_SPACING, req.height + NOTIFY_STACK_SPACING,
+					      index++);
 			theme_move_notification(nw2, x, y);
 		}
 		else if (nw_l != NULL)
@@ -254,7 +257,7 @@ notify_stack_add_window(NotifyStack *stack,
 
 	gtk_widget_size_request(GTK_WIDGET(nw), &req);
 	notify_stack_shift_notifications(stack, nw, NULL,
-									 req.width, req.height, &x, &y);
+					 req.width + NOTIFY_STACK_SPACING, req.height + NOTIFY_STACK_SPACING, &x, &y);
 	theme_move_notification(nw, x, y);
 
 	if (new_notification)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]