[gnome-software/gnome-3-20] Get the correct icon size when installing xdg-app bundles on HiDPI



commit ac17b15c7d64e274894dcbca35bc419ad8348cbe
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 29 18:43:50 2016 +0000

    Get the correct icon size when installing xdg-app bundles on HiDPI

 src/plugins/gs-plugin-xdg-app.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-xdg-app.c b/src/plugins/gs-plugin-xdg-app.c
index 6b90e5b..4853f9c 100644
--- a/src/plugins/gs-plugin-xdg-app.c
+++ b/src/plugins/gs-plugin-xdg-app.c
@@ -1547,7 +1547,9 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
        }
 
        /* load icon */
-       icon_data = xdg_app_bundle_ref_get_icon (xref_bundle, 64);
+       icon_data = xdg_app_bundle_ref_get_icon (xref_bundle, 64 * plugin->scale);
+       if (icon_data == NULL)
+               icon_data = xdg_app_bundle_ref_get_icon (xref_bundle, 64);
        if (icon_data != NULL) {
                g_autoptr(GInputStream) stream_icon = NULL;
                g_autoptr(GdkPixbuf) pixbuf = NULL;


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