[epiphany/mcatanzaro/no-favicon-in-snapshots: 4/4] Stop including favicon in overview snapshots



commit 9e6788c0ae100f4fad5dbe59e39bb93760a4516c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Aug 6 15:56:49 2019 -0500

    Stop including favicon in overview snapshots
    
    With the new design of the overview, the favicons are currently cut off
    so you can't see them, because we don't show the leftmost portion of the
    snapshots. But if we did show them, it wouldn't look good anymore. The
    favicon is now way too small relative to the much larger size of the
    rest of the snapshot. So we'd better just drop it.
    
    See #874

 lib/ephy-snapshot-service.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/lib/ephy-snapshot-service.c b/lib/ephy-snapshot-service.c
index 625f86c3d..206822f22 100644
--- a/lib/ephy-snapshot-service.c
+++ b/lib/ephy-snapshot-service.c
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "ephy-snapshot-service.h"
 
-#include "ephy-favicon-helpers.h"
 #include "ephy-file-helpers.h"
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
@@ -213,8 +212,7 @@ out:
 }
 
 static GdkPixbuf *
-ephy_snapshot_service_prepare_snapshot (cairo_surface_t *surface,
-                                        cairo_surface_t *favicon)
+ephy_snapshot_service_prepare_snapshot (cairo_surface_t *surface)
 {
   GdkPixbuf *snapshot, *scaled;
   int orig_width, orig_height;
@@ -258,20 +256,6 @@ ephy_snapshot_service_prepare_snapshot (cairo_surface_t *surface,
 
   g_object_unref (snapshot);
 
-  x_offset = 6;
-  if (favicon) {
-    GdkPixbuf *fav_pixbuf;
-    int favicon_size = 16;
-    int y_offset = gdk_pixbuf_get_height (scaled) - favicon_size - x_offset;
-
-    fav_pixbuf = ephy_pixbuf_get_from_surface_scaled (favicon, favicon_size, favicon_size);
-    gdk_pixbuf_composite (fav_pixbuf, scaled,
-                          x_offset, y_offset, favicon_size, favicon_size,
-                          x_offset, y_offset, 1, 1,
-                          GDK_INTERP_NEAREST, 255);
-    g_object_unref (fav_pixbuf);
-  }
-
   return scaled;
 }
 
@@ -425,8 +409,7 @@ save_snapshot (cairo_surface_t *surface,
 {
   SnapshotAsyncData *data = g_task_get_task_data (task);
 
-  data->snapshot = ephy_snapshot_service_prepare_snapshot (surface,
-                                                           webkit_web_view_get_favicon (data->web_view));
+  data->snapshot = ephy_snapshot_service_prepare_snapshot (surface);
 
   ephy_snapshot_service_save_snapshot_async (g_task_get_source_object (task),
                                              data->snapshot,


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