From e8ea6b0969439ffb3e102e88122a04e148a5c2b3 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Thu, 8 Nov 2018 20:32:41 +0100 Subject: Fix compiling bug --- src/helper/icon-loader.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/helper/icon-loader.cpp') diff --git a/src/helper/icon-loader.cpp b/src/helper/icon-loader.cpp index 39918d8ff..c9bce778d 100644 --- a/src/helper/icon-loader.cpp +++ b/src/helper/icon-loader.cpp @@ -38,6 +38,13 @@ Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gint size) return icon_theme->load_icon(icon_name, size, Gtk::ICON_LOOKUP_FORCE_SIZE); } +Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::IconSize icon_size) +{ + int width, height; + Gtk::IconSize::lookup(icon_size, width, height); + return sp_get_icon_pixbuf(icon_name, width); +} + Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size) { int width, height; @@ -62,19 +69,20 @@ Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gchar cons return sp_get_icon_pixbuf(icon_name, icon_size); } -Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gint size) + +Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size) { Gtk::Image *icon = new Gtk::Image(); - icon->set_from_icon_name(icon_name, Gtk::IconSize(size)); + icon->set_from_icon_name(icon_name, Gtk::IconSize(icon_size)); return icon; } -Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size) +Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::IconSize icon_size) { Gtk::Image *icon = new Gtk::Image(); - icon->set_from_icon_name(icon_name, Gtk::IconSize(icon_size)); + icon->set_from_icon_name(icon_name, icon_size); return icon; } -- cgit v1.2.3