[geary] Tweak offset used when scrolling to messages mid-conversation.



commit 339b2b6153718b866b70b473341a40e005c5d8bc
Author: Michael James Gratton <mike vee net>
Date:   Tue Apr 17 12:35:27 2018 +1000

    Tweak offset used when scrolling to messages mid-conversation.

 .../conversation-viewer/conversation-list-box.vala |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-list-box.vala 
b/src/client/conversation-viewer/conversation-list-box.vala
index 5cbe01d..928952f 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -33,11 +33,11 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
 
     // Offset from the top of the list box which emails views will
     // scrolled to, so the user can see there are additional messages
-    // above it. XXX This is currently approx 1.5 times the height of
+    // above it. XXX This is currently approx 0.5 times the height of
     // a collapsed ConversationEmail, it should probably calculated
     // somehow so that differences user's font size are taken into
     // account.
-    private const int EMAIL_TOP_OFFSET = 92;
+    private const int EMAIL_TOP_OFFSET = 32;
 
     // Loading spinner timeout
     private const int LOADING_TIMEOUT_MSEC = 150;
@@ -951,11 +951,8 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
             y = alloc.y - EMAIL_TOP_OFFSET;
         }
 
-        // XXX This doesn't always quite work right, maybe since it's
-        // hard getting a reliable height out of WebKitGTK, or maybe
-        // because we stop calling this method when the email message
-        // body has finished loading, but attachments and sub-messages
-        // may still be loading. Or both?
+        // Use set_value rather than clamp_value since we want to
+        // scroll to the top of the window.
         get_adjustment().set_value(y);
     }
 


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