[geary/cherry-pick-b7f868f6] Merge branch 'zoom-preferred-height' into 'master'



commit 6453d8bea2938f706989f830dc29e9b00a1a0690
Author: Michael Gratton <mike vee net>
Date:   Wed Oct 10 06:39:39 2018 +0000

    Merge branch 'zoom-preferred-height' into 'master'
    
    Take zoom level into account when determining preferred height
    
    See merge request GNOME/geary!51
    
    (cherry picked from commit b7f868f662c61029af8f1d9694ed0d5a60b626b7)
    
    14bb8161 Take zoom level into account when determining preferred height

 src/client/components/client-web-view.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 01185fe2..55bb7fb7 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -536,7 +536,7 @@ public class ClientWebView : WebKit.WebView, Geary.BaseInterface {
 
     private void on_preferred_height_changed(WebKit.JavascriptResult result) {
         try {
-            int height = (int) WebKitUtil.to_number(result);
+            int height = (int) GLib.Math.ceil(WebKitUtil.to_number(result) * this.zoom_level);
             // Avoid notifying if the values have not changed
             if (this.preferred_height != height) {
                 // value has changed


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