[Commits] [SCM] claws branch, litehtml, updated. 3.17.3-115-gf372dd1

ticho at claws-mail.org ticho at claws-mail.org
Mon Feb 11 23:15:01 CET 2019


The branch, litehtml has been updated
       via  f372dd18a61433c83def6188180b5e3666d6797e (commit)
      from  eb864a736bfc87db123c71db2c0e55fa5b110906 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/lh_widget.cpp |    7 +++++++
 1 file changed, 7 insertions(+)


- Log -----------------------------------------------------------------
commit f372dd18a61433c83def6188180b5e3666d6797e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Feb 11 23:10:45 2019 +0100

    Reset Litehtml scrolledwindow to top-left when displaying new content

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp
index 61abf61..df6ee99 100644
--- a/src/plugins/litehtml_viewer/lh_widget.cpp
+++ b/src/plugins/litehtml_viewer/lh_widget.cpp
@@ -218,6 +218,7 @@ statusbar_pop:
 void lh_widget::open_html(const gchar *contents)
 {
 	gint num = clear_images(lh_prefs_get()->image_cache_size * 1024 * 1000);
+	GtkAdjustment *adj;
 
 	debug_print("LH: cleared %d images from image cache\n", num);
 
@@ -226,6 +227,12 @@ void lh_widget::open_html(const gchar *contents)
 	m_rendered_width = 0;
 	if (m_html != NULL) {
 		debug_print("lh_widget::open_html created document\n");
+		adj = gtk_scrolled_window_get_hadjustment(
+				GTK_SCROLLED_WINDOW(m_scrolled_window));
+		gtk_adjustment_set_value(adj, 0.0);
+		adj = gtk_scrolled_window_get_vadjustment(
+				GTK_SCROLLED_WINDOW(m_scrolled_window));
+		gtk_adjustment_set_value(adj, 0.0);
 		redraw();
 	}
 	lh_widget_statusbar_pop();

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list