[epiphany] Increase thumbnail width / height



commit d529d07f52fa85a5a97772405133397251e82c48
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Wed Jan 2 11:03:39 2019 +0100

    Increase thumbnail width / height
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/605

 embed/ephy-about-handler.c                   | 2 +-
 embed/web-extension/resources/js/overview.js | 7 ++++---
 lib/ephy-snapshot-service.h                  | 4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index f11ce3a98..787469be8 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -373,7 +373,7 @@ history_service_query_urls_cb (EphyHistoryService     *history,
 
     snapshot = ephy_snapshot_service_lookup_cached_snapshot_path (snapshot_service, url->url);
     if (snapshot)
-      thumbnail_style = g_strdup_printf (" style=\"background: url(file://%s) no-repeat;\"", snapshot);
+      thumbnail_style = g_strdup_printf (" style=\"background: url(file://%s) no-repeat; background-size: 
100%%;\"", snapshot);
     else
       ephy_embed_shell_schedule_thumbnail_update (shell, url);
 
diff --git a/embed/web-extension/resources/js/overview.js b/embed/web-extension/resources/js/overview.js
index d00b68bea..e5175c0c1 100644
--- a/embed/web-extension/resources/js/overview.js
+++ b/embed/web-extension/resources/js/overview.js
@@ -207,15 +207,16 @@ Ephy.Overview.Item = class OverviewItem
             return null;
 
         if (background.startsWith('url("file://'))
-            return background.replace('url("file://', '').replace('") no-repeat', '');
+            return background.replace('url("file://', '').replace('"); background-size: 100%', '');
 
         return null;
     }
 
     setThumbnailPath(path)
     {
-        if (path)
-            this._thumbnail.style.background = 'url(file://' + path + ') no-repeat';
+        if (path) {
+            this._thumbnail.style.background = 'url(file://' + path + '); background-size: 100%';
+        }
         else
             this._thumbnail.style.background = null;
     }
diff --git a/lib/ephy-snapshot-service.h b/lib/ephy-snapshot-service.h
index 857ad1cae..f593f6f18 100644
--- a/lib/ephy-snapshot-service.h
+++ b/lib/ephy-snapshot-service.h
@@ -40,8 +40,8 @@ typedef enum {
 } EphySnapshotServiceError;
 
 /* Values taken from the Web mockups. */
-#define EPHY_THUMBNAIL_WIDTH 180
-#define EPHY_THUMBNAIL_HEIGHT 135
+#define EPHY_THUMBNAIL_WIDTH 360
+#define EPHY_THUMBNAIL_HEIGHT 270
 
 GQuark               ephy_snapshot_service_error_quark                      (void);
 


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