changeset 22477:82c4e6b589d0

never decrease the height by less than half a line, fixes the jumping issue when the text typed doesn't use the default font for me (such as having Sans as the default font, but typing Chinese which uses a Chinese font with a different line height)
author Ka-Hing Cheung <khc@hxbc.us>
date Mon, 17 Mar 2008 01:50:54 +0000
parents b5af505a7b02
children 04edbd747947 633eabc7eff4
files pidgin/gtkconv.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sun Mar 16 20:37:49 2008 +0000
+++ b/pidgin/gtkconv.c	Mon Mar 17 01:50:54 2008 +0000
@@ -4393,7 +4393,7 @@
 		height += (oneline.height + pad_inside) * (wrapped_lines - lines);
 
 	diff = height - gtkconv->entry->allocation.height;
-	if (diff == 0)
+	if (diff == 0 || (diff < 0 && -diff < oneline.height / 2))
 		return FALSE;
 
 	gtk_widget_size_request(gtkconv->lower_hbox, &sr);