never decrease the height by less than half a line, fixes the jumping issue

Mon, 17 Mar 2008 01:50:54 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Mon, 17 Mar 2008 01:50:54 +0000
changeset 22625
2d5dd1f0a050
parent 22623
b57cb2c76d28
child 22626
dc8523c19501
child 22627
148d2f4f6c1b

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)

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
--- 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);

mercurial