[evolution-patches] [PATCH 02/22] BUGFIX: GNOME Bugzilla #602796 - Mail window resizes to a wrong height. (cherry picked from commit b0f9261d0c8d1c718f58124b1883cb9fea8a3cbc)



From: Srinivasa Ragavan <sragavan gnome org>


Signed-off-by: Yan Li <yanli infradead org>
---
 src/mail-message-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index 930b48c..500592c 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -689,7 +689,8 @@ mmv_finished_loading_webkit (WebKitWebView  *webkitwebview, WebKitWebFrame *arg1
 	gtk_widget_set_size_request ((GtkWidget *)webkitwebview, -1, webkit_web_frame_get_height(arg1));
 #endif	 
 	gtk_widget_size_request ((GtkWidget *)webkitwebview, &req);
-        gtk_widget_set_size_request ((GtkWidget *)webkitwebview, req.width, req.height);
+	if (req.height > 500) /* Wierd reason, but webkit resizes if we set a smaller size, before the content is loaded.*/
+        	gtk_widget_set_size_request ((GtkWidget *)webkitwebview, req.width, req.height+10);
 	/* Connect on expose, and mark mail as read on expose, when the mail is actually seen */
 	g_signal_connect (webkitwebview, "expose-event" , G_CALLBACK(mark_mail_read), mmview);
 	g_signal_emit (mmview, signals[MESSAGE_LOADED], 0);
-- 
1.6.5.7



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]