[longomatch] Looks like the LoadIcon from IconTheme is buggy on Windows and OSX and get a random size. Make sure



commit a593e75ea1489cc8f6bd5f3c03cb08c753344a63
Author: Julien Moutte <julien fluendo com>
Date:   Thu Sep 4 17:05:41 2014 +0200

    Looks like the LoadIcon from IconTheme is buggy on Windows and OSX and get a random size. Make sure we 
load the SVG icons with requested size.

 LongoMatch.GUI.Helpers/Misc.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI.Helpers/Misc.cs b/LongoMatch.GUI.Helpers/Misc.cs
index 205c93b..a0cd94e 100644
--- a/LongoMatch.GUI.Helpers/Misc.cs
+++ b/LongoMatch.GUI.Helpers/Misc.cs
@@ -216,7 +216,9 @@ namespace LongoMatch.Gui.Helpers
                public static Gdk.Pixbuf LoadIcon (string name, int size, IconLookupFlags flags)
                {
                        try {
-                         return IconTheme.Default.LoadIcon (name, size, flags);
+                               IconInfo icon_info = Gtk.IconTheme.Default.LookupIcon (name, size, flags);
+                               Gdk.Pixbuf res = new Gdk.Pixbuf (icon_info.Filename, size, size, true);
+                           return res;
                        } catch (System.Exception) {
                                return LoadMissingIcon (size);
                        }


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