From: <rl...@us...> - 2006-05-27 06:38:13
|
Revision: 16199 Author: rlaager Date: 2006-05-26 23:38:06 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16199&view=rev Log Message: ----------- 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. Modified Paths: -------------- trunk/src/gtkconv.c Modified: trunk/src/gtkconv.c =================================================================== --- trunk/src/gtkconv.c 2006-05-26 03:26:03 UTC (rev 16198) +++ trunk/src/gtkconv.c 2006-05-27 06:38:06 UTC (rev 16199) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |