Mercurial > pidgin.yaz
changeset 13787:a679f7700ff0
[gaim-migrate @ 16199]
Fix Launchpad Bug #46863
https://launchpad.net/bugs/46863
Ubuntu's default theme has a larger close icon than GNOME. This causes the tab close button to cut off part of the icon. This resolves it. It's from Epiphany, so I didn't test it extensively. I don't know how it behaves on older GTK+ versions.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 27 May 2006 06:38:06 +0000 |
parents | 5ddde4ad1ca2 |
children | ef95bcc62330 |
files | src/gtkconv.c |
diffstat | 1 files changed, 9 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Fri May 26 03:26:03 2006 +0000 +++ b/src/gtkconv.c Sat May 27 06:38:06 2006 +0000 @@ -7533,7 +7533,7 @@ GtkWidget *close_image; GaimConversationType conv_type; const gchar *tmp_lab; - gint close_button_width, close_button_height, focus_width, focus_pad; + GtkRcStyle *rcstyle; gboolean tabs_side = FALSE; gint angle = 0; @@ -7559,20 +7559,15 @@ /* Close button. */ gtkconv->close = gtk_button_new(); - gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &close_button_width, &close_button_height); - if (gtk_check_version(2, 4, 2) == NULL) { - /* Need to account for extra padding around the gtkbutton */ - gtk_widget_style_get(GTK_WIDGET(gtkconv->close), - "focus-line-width", &focus_width, - "focus-padding", &focus_pad, - NULL); - close_button_width += (focus_width + focus_pad) * 2; - close_button_height += (focus_width + focus_pad) * 2; - } - gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), - close_button_width, close_button_height); - + + gtk_button_set_focus_on_click(GTK_BUTTON(gtkconv->close), FALSE); gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); + + rcstyle = gtk_rc_style_new (); + rcstyle->xthickness = rcstyle->ythickness = 0; + gtk_widget_modify_style(gtkconv->close, rcstyle); + gtk_rc_style_unref(rcstyle); + close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); gtk_widget_show(close_image); gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image);