[gnome-characters/wip/dueno/emoji] categoryList: Use Util.loadIcon instead of GThemedIcon
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/wip/dueno/emoji] categoryList: Use Util.loadIcon instead of GThemedIcon
- Date: Tue, 22 Aug 2017 16:27:35 +0000 (UTC)
commit f4cddde0a248dd0f998b32cead50c74150f7acf3
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]