Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 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 | f4f68315a07a |
children | ef95bcc62330 |
comparison
equal
deleted
inserted
replaced
13786:5ddde4ad1ca2 | 13787:a679f7700ff0 |
---|---|
7531 GtkWidget *tabby, *menu_tabby; | 7531 GtkWidget *tabby, *menu_tabby; |
7532 GtkWidget *tab_cont = gtkconv->tab_cont; | 7532 GtkWidget *tab_cont = gtkconv->tab_cont; |
7533 GtkWidget *close_image; | 7533 GtkWidget *close_image; |
7534 GaimConversationType conv_type; | 7534 GaimConversationType conv_type; |
7535 const gchar *tmp_lab; | 7535 const gchar *tmp_lab; |
7536 gint close_button_width, close_button_height, focus_width, focus_pad; | 7536 GtkRcStyle *rcstyle; |
7537 gboolean tabs_side = FALSE; | 7537 gboolean tabs_side = FALSE; |
7538 gint angle = 0; | 7538 gint angle = 0; |
7539 | 7539 |
7540 conv_type = gaim_conversation_get_type(conv); | 7540 conv_type = gaim_conversation_get_type(conv); |
7541 | 7541 |
7557 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 7557 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
7558 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 7558 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
7559 | 7559 |
7560 /* Close button. */ | 7560 /* Close button. */ |
7561 gtkconv->close = gtk_button_new(); | 7561 gtkconv->close = gtk_button_new(); |
7562 gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &close_button_width, &close_button_height); | 7562 |
7563 if (gtk_check_version(2, 4, 2) == NULL) { | 7563 gtk_button_set_focus_on_click(GTK_BUTTON(gtkconv->close), FALSE); |
7564 /* Need to account for extra padding around the gtkbutton */ | |
7565 gtk_widget_style_get(GTK_WIDGET(gtkconv->close), | |
7566 "focus-line-width", &focus_width, | |
7567 "focus-padding", &focus_pad, | |
7568 NULL); | |
7569 close_button_width += (focus_width + focus_pad) * 2; | |
7570 close_button_height += (focus_width + focus_pad) * 2; | |
7571 } | |
7572 gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), | |
7573 close_button_width, close_button_height); | |
7574 | |
7575 gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); | 7564 gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); |
7565 | |
7566 rcstyle = gtk_rc_style_new (); | |
7567 rcstyle->xthickness = rcstyle->ythickness = 0; | |
7568 gtk_widget_modify_style(gtkconv->close, rcstyle); | |
7569 gtk_rc_style_unref(rcstyle); | |
7570 | |
7576 close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); | 7571 close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); |
7577 gtk_widget_show(close_image); | 7572 gtk_widget_show(close_image); |
7578 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); | 7573 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); |
7579 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, | 7574 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, |
7580 _("Close conversation"), NULL); | 7575 _("Close conversation"), NULL); |