[geary/wip/765516-gtk-widget-conversation-viewer: 124/207] Fix jumpy focus scrolling on emails bigger than the viewport.



commit 020ebfd2a638f2bfefac76dfcb14d47d13637994
Author: Michael James Gratton <mike vee net>
Date:   Thu Jul 28 23:47:32 2016 +1000

    Fix jumpy focus scrolling on emails bigger than the viewport.

 .../conversation-viewer/conversation-viewer.vala   |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 9997904..5895b10 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -273,9 +273,18 @@ public class ConversationViewer : Gtk.Stack {
 
     // Add a new conversation list to the UI
     private void add_new_list(ConversationListBox list) {
-        list.show();
-        this.conversation_page.add(list);
         this.current_list = list;
+        list.show();
+
+        // Manually create a Viewport rather than letting
+        // ScrolledWindow do it so Container.set_focus_{h,v}adjustment
+        // are not set on the list - it makes changing focus jumpy
+        // when a row or its web_view are larger than the viewport.
+        Gtk.Viewport viewport = new Gtk.Viewport(null, null);
+        viewport.show();
+        viewport.add(list);
+
+        this.conversation_page.add(viewport);
     }
 
     // Remove any existing conversation list, cancelling its loading


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