diff src/gtkimhtml.c @ 8588:7f7679853f7b

[gaim-migrate @ 9339] There was a bug: HR tags made the horizontal scroll bar show up on conversation windows. This mostly fixes that by leaving a little gap on the right side. You can still make the scroll bar appear if you reduce the size of the window. But it's only sometimes. Eh. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 06 Apr 2004 01:00:22 +0000
parents 88988327a4e0
children 44d6285a87af
line wrap: on
line diff
--- a/src/gtkimhtml.c	Mon Apr 05 22:51:43 2004 +0000
+++ b/src/gtkimhtml.c	Tue Apr 06 01:00:22 2004 +0000
@@ -2220,12 +2220,12 @@
 		float factor;
 		int new_width = image->width, new_height = image->height;
 
-		if(image->width > width){
+		if(image->width > (width - 2)){
 			factor = (float)(width)/image->width;
 			new_width = width;
 			new_height = image->height * factor;
 		}
-		if(new_height > height){
+		if(new_height >= (height - 2)){
 			factor = (float)(height)/new_height;
 			new_height = height;
 			new_width = new_width * factor;
@@ -2414,7 +2414,7 @@
 
 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height)
 {
-	gtk_widget_set_size_request(((GtkIMHtmlHr *)scale)->sep, width, 2);
+	gtk_widget_set_size_request(((GtkIMHtmlHr *)scale)->sep, width - 2, 2);
 }
 
 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)