# HG changeset patch # User Ka-Hing Cheung # Date 1191899582 0 # Node ID effa512ad24afe8e648c56da2b443a183dc42728 # Parent ccb728fa5af88a85e9290ced33a80c0e1b421c32 fix the auto resize code for the showing formatting toolbar case, which is the default. Previously it wasn't taking the height of the formatting toolbar into account Surprisingly I don't see a ticket for this. diff -r ccb728fa5af8 -r effa512ad24a pidgin/gtkconv.c --- a/pidgin/gtkconv.c Tue Oct 09 02:54:09 2007 +0000 +++ b/pidgin/gtkconv.c Tue Oct 09 03:13:02 2007 +0000 @@ -4371,8 +4371,8 @@ int wrapped_lines; int lines; GdkRectangle oneline; - GtkRequisition sr; - int height; + GtkRequisition sr, entry_sr; + int height, diff; int pad_top, pad_inside, pad_bottom; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); @@ -4398,10 +4398,14 @@ gtkconv->auto_resize = TRUE; g_idle_add(reset_auto_resize_cb, gtkconv); - gtk_widget_size_request(gtkconv->lower_hbox, &sr); - if (sr.height < height + PIDGIN_HIG_BOX_SPACE) { + + gtk_widget_size_request(gtkconv->entry, &entry_sr); + diff = height - entry_sr.height; + + if (diff > 0) { + gtk_widget_size_request(gtkconv->lower_hbox, &sr); gtkconv->entry_growing = TRUE; - gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height + PIDGIN_HIG_BOX_SPACE); + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, diff + sr.height); } }