[epiphany] HiDPI favicons for tab menus
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] HiDPI favicons for tab menus
- Date: Sun, 2 Aug 2020 17:14:20 +0000 (UTC)
commit dee3537511a1ff5eb2412c36fb4c12c3abc01c7b
Author: Stephan Verbücheln <verbuecheln posteo de>
Date: Sun Aug 2 15:34:36 2020 +0200
HiDPI favicons for tab menus
src/ephy-action-bar-start.c | 9 ++++++++-
src/ephy-page-row.c | 8 +++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index 969295b2d..69a70572d 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -110,9 +110,16 @@ icon_loaded_cb (GObject *source,
}
if (favicon) {
- gtk_image_set_from_pixbuf (GTK_IMAGE (image), favicon);
+ cairo_surface_t *surface;
+
+ surface = gdk_cairo_surface_create_from_pixbuf (favicon,
+ 0,
+ gtk_widget_get_window (GTK_WIDGET (image)));
+ gtk_image_set_from_surface (GTK_IMAGE (image), surface);
+
gtk_widget_show (image);
+ cairo_surface_destroy (surface);
g_object_unref (favicon);
}
diff --git a/src/ephy-page-row.c b/src/ephy-page-row.c
index 79680a3dd..adacca81a 100644
--- a/src/ephy-page-row.c
+++ b/src/ephy-page-row.c
@@ -142,7 +142,13 @@ sync_favicon (EphyWebView *view,
pixbuf = gdk_pixbuf_copy (ephy_web_view_get_icon (view));
if (pixbuf) {
- gtk_image_set_from_pixbuf (self->icon, pixbuf);
+ cairo_surface_t *surface;
+
+ surface = gdk_cairo_surface_create_from_pixbuf (pixbuf,
+ 0,
+ gtk_widget_get_window (GTK_WIDGET (view)));
+ gtk_image_set_from_surface (GTK_IMAGE (self->icon), surface);
+ cairo_surface_destroy (surface);
} else {
const char *favicon_name = ephy_get_fallback_favicon_name (ephy_web_view_get_display_address (view),
EPHY_FAVICON_TYPE_SHOW_MISSING_PLACEHOLDER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]