[gnome-characters] categoryList: Use Util.loadIcon instead of GThemedIcon



commit 3aae31369f6b201dc4c91fad25d94c089c5f4a35
Author: Daiki Ueno <dueno src gnome org>
Date:   Tue Aug 22 16:38:10 2017 +0200

    categoryList: Use Util.loadIcon instead of GThemedIcon

 src/categoryList.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/categoryList.js b/src/categoryList.js
index efd548c..f98131b 100644
--- a/src/categoryList.js
+++ b/src/categoryList.js
@@ -168,8 +168,8 @@ const CategoryListRowWidget = new Lang.Class({
         let hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL });
         this.add(hbox);
 
-        let icon = new Gio.ThemedIcon({ name: category.icon_name });
-        let image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.LARGE_TOOLBAR);
+        let pixbuf = Util.loadIcon(category.icon_name, 24);
+        let image = Gtk.Image.new_from_pixbuf(pixbuf);
         image.get_style_context().add_class('category-icon');
         hbox.pack_start(image, false, false, 2);
 
@@ -179,10 +179,10 @@ const CategoryListRowWidget = new Lang.Class({
         hbox.pack_start(label, true, true, 0);
 
         if (category.secondary_icon_name) {
-            let icon = new Gio.ThemedIcon({ name: category.secondary_icon_name });
-            let image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON);
+            let pixbuf = Util.loadIcon(category.secondary_icon_name, 16);
+            let image = Gtk.Image.new_from_pixbuf(pixbuf);
             image.get_style_context().add_class('category-icon');
-            hbox.pack_start(image, false, false, 2);
+            hbox.pack_end(image, false, false, 2);
         }
     }
 });


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