summaryrefslogtreecommitdiffstats
path: root/src/helper/icon-loader.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2018-11-08 19:32:41 +0000
committerJabiertxof <jabier.arraiza@marker.es>2018-11-09 10:44:37 +0000
commite8ea6b0969439ffb3e102e88122a04e148a5c2b3 (patch)
treea21f52696208dfc19cdf4d00c9d42421f572de68 /src/helper/icon-loader.cpp
parentFixing symbols icon size (diff)
downloadinkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.tar.gz
inkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.zip
Fix compiling bug
Diffstat (limited to 'src/helper/icon-loader.cpp')
-rw-r--r--src/helper/icon-loader.cpp16
1 files changed, 12 insertions, 4 deletions
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<Gdk::Pixbuf> 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<Gdk::Pixbuf> 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<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size)
{
int width, height;
@@ -62,19 +69,20 @@ Glib::RefPtr<Gdk::Pixbuf> 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;
}