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



commit 6e9cd557c74dad18eb183941371b2f38214631ec
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]