[evolution/wip/webkit2] [EStockRequest] Calculate pixel icon size when needed



commit c5a06f46e5d6b30688ffd719cae677235c0a0bc7
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 20 12:08:17 2016 +0200

    [EStockRequest] Calculate pixel icon size when needed

 e-util/e-stock-request.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-stock-request.c b/e-util/e-stock-request.c
index d60ae5d..dac07ed 100644
--- a/e-util/e-stock-request.c
+++ b/e-util/e-stock-request.c
@@ -128,6 +128,14 @@ process_stock_request_idle_cb (gpointer user_data)
                GtkIconTheme *icon_theme;
                GtkIconInfo *icon_info;
                const gchar *filename;
+               gint icon_width, icon_height;
+
+               if (!gtk_icon_size_lookup (size, &icon_width, &icon_height)) {
+                       icon_width = size;
+                       icon_height = size;
+               }
+
+               size = MAX (icon_width, icon_height);
 
                icon_theme = gtk_icon_theme_get_default ();
 


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