changeset 23000:d678dbea81a4

Reduce the enormous padding in the group tooltip. People will hopefully dislike it less now.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 18 May 2008 20:26:14 +0000
parents 6843c06f5c6a
children d03b32530854
files pidgin/gtkblist.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sun May 18 20:00:26 2008 +0000
+++ b/pidgin/gtkblist.c	Sun May 18 20:26:14 2008 +0000
@@ -2653,6 +2653,7 @@
 	int name_width;
 	int width;
 	int height;
+	int padding;
 };
 
 static PangoLayout * create_pango_layout(const char *markup, int *width, int *height)
@@ -2681,6 +2682,7 @@
 	if (purple_account_is_disconnected(account))
 		gdk_pixbuf_saturate_and_pixelate(td->status_icon, td->status_icon, 0.0, FALSE);
 	td->layout = create_pango_layout(purple_account_get_username(account), &td->width, &td->height);
+	td->padding = SMALL_SPACE;
 	return td;
 }
 
@@ -2696,6 +2698,7 @@
 		account = ((PurpleChat*)(node))->account;
 	}
 
+	td->padding = TOOLTIP_BORDER;
 	td->status_icon = pidgin_blist_get_status_icon(node, PIDGIN_STATUS_ICON_LARGE);
 	td->avatar = pidgin_blist_get_buddy_icon(node, !full, FALSE);
 	if (account != NULL) {
@@ -2861,7 +2864,7 @@
 			}
 		}
 
-		current_height += MAX(td->name_height + td->height, td->avatar_height) + TOOLTIP_BORDER;
+		current_height += MAX(td->name_height + td->height, td->avatar_height) + td->padding;
 	}
 	return FALSE;
 }
@@ -2952,8 +2955,7 @@
 		struct tooltip_data *td = list->data;
 		max_text_width = MAX(max_text_width, MAX(td->width, td->name_width));
 		max_avatar_width = MAX(max_avatar_width, td->avatar_width);
-		height += MAX(TOOLTIP_BORDER + MAX(STATUS_SIZE, td->avatar_height),
-				TOOLTIP_BORDER + td->height + td->name_height);
+		height += MAX(MAX(STATUS_SIZE, td->avatar_height), td->height + td->name_height) + td->padding;
 		if (td->status_icon)
 			status_size = MAX(status_size, STATUS_SIZE);
 	}