# HG changeset patch # User Elliott Sales de Andrade # Date 1269066173 0 # Node ID 7ed0ddbdd2a8ab471d88f35fc651509c5da7e685 # Parent 0d613fa75e5fce7bf64257f333614974e896c99f Use an inline RC style to get rid of some other padding to make the small buttons even smaller, as suggested by Paradox on trac, and nicked from nautilus. Refs #8727. diff -r 0d613fa75e5f -r 7ed0ddbdd2a8 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Sat Mar 20 06:17:13 2010 +0000 +++ b/pidgin/gtkutils.c Sat Mar 20 06:22:53 2010 +0000 @@ -156,7 +156,6 @@ pidgin_create_small_button(GtkWidget *image) { GtkWidget *button; - GtkRcStyle *rcstyle; button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); @@ -164,11 +163,8 @@ /* don't allow focus on the close button */ gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE); - /* make it as small as possible */ - rcstyle = gtk_rc_style_new(); - rcstyle->xthickness = rcstyle->ythickness = 0; - gtk_widget_modify_style(button, rcstyle); - gtk_rc_style_unref(rcstyle); + /* set style to make it as small as possible */ + gtk_widget_set_name(button, "pidgin-small-close-button"); gtk_widget_show(image); @@ -3473,6 +3469,16 @@ if (purple_running_gnome()) register_gnome_url_handlers(); + /* Used to make small buttons */ + gtk_rc_parse_string("style \"pidgin-small-close-button\"\n" + "{\n" + "GtkWidget::focus-padding = 0\n" + "GtkWidget::focus-line-width = 0\n" + "xthickness = 0\n" + "ythickness = 0\n" + "}\n" + "widget \"*.pidgin-small-close-button\" style \"pidgin-small-close-button\""); + #ifdef _WIN32 winpidgin_register_win32_url_handlers(); #endif