[evolution] Bug 784874 - Huge icons in Edit->Preferences sections column



commit 61d6d5dbde62c569573b3da0538bacbde30c8704
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 13 11:06:19 2017 +0200

    Bug 784874 - Huge icons in Edit->Preferences sections column

 src/e-util/e-preferences-window.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/e-util/e-preferences-window.c b/src/e-util/e-preferences-window.c
index 47961e6..577b7f6 100644
--- a/src/e-util/e-preferences-window.c
+++ b/src/e-util/e-preferences-window.c
@@ -20,14 +20,15 @@
 
 #include "evolution-config.h"
 
-#include "e-preferences-window.h"
-
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 
 #include "e-dialog-widgets.h"
+#include "e-icon-factory.h"
 #include "e-misc-utils.h"
 
+#include "e-preferences-window.h"
+
 #define SWITCH_PAGE_INTERVAL 250
 
 #define E_PREFERENCES_WINDOW_GET_PRIVATE(obj) \
@@ -127,6 +128,15 @@ preferences_window_load_pixbuf (const gchar *icon_name)
                g_error_free (error);
        }
 
+       if (pixbuf && (gdk_pixbuf_get_width (pixbuf) != size || gdk_pixbuf_get_height (pixbuf) != size)) {
+               GdkPixbuf *scaled;
+
+               scaled = e_icon_factory_pixbuf_scale (pixbuf, size, size);
+               g_object_unref (pixbuf);
+
+               pixbuf = scaled;
+       }
+
        return pixbuf;
 }
 


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