changeset 4903:872598a15968

[gaim-migrate @ 5237] well that didn't fix it, and this is actually better committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 28 Mar 2003 07:48:17 +0000
parents 0bbccc88bc67
children e61a072f4425
files src/gtkimhtml.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Fri Mar 28 07:22:27 2003 +0000
+++ b/src/gtkimhtml.c	Fri Mar 28 07:48:17 2003 +0000
@@ -1377,21 +1377,23 @@
 
 static gboolean gtk_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data)
 {
-	static int old_width = 0, old_height = 0;
+	static GdkRectangle old_rect = {0,0,0,0};
+	GdkRectangle rect;
 
-	if(old_width && (old_width != alloc->width || old_height != alloc->height)){
+	gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(widget), &rect);
+
+	if(old_rect.width && (old_rect.width != rect.width || old_rect.height != rect.height)){
 		GList *iter = GTK_IMHTML(widget)->scalables;
 
 		while(iter){
 			GtkIMHtmlScalable *scale = GTK_IMHTML_SCALABLE(iter->data);
-			scale->scale(scale, alloc->width, alloc->height);
+			scale->scale(scale, rect.width, rect.height);
 
 			iter = iter->next;
 		}
 	}
 
-	old_width = alloc->width;
-	old_height = alloc->height;
+	old_rect = rect;
 	return FALSE;
 }