summaryrefslogtreecommitdiffstats
path: root/src/helper
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
parentFixing symbols icon size (diff)
downloadinkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.tar.gz
inkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.zip
Fix compiling bug
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/icon-loader.cpp16
-rw-r--r--src/helper/icon-loader.h3
2 files changed, 14 insertions, 5 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;
}
diff --git a/src/helper/icon-loader.h b/src/helper/icon-loader.h
index 22658225e..dd4b3a4ce 100644
--- a/src/helper/icon-loader.h
+++ b/src/helper/icon-loader.h
@@ -18,10 +18,11 @@
Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, gint size);
Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size);
+Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::IconSize icon_size);
Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, GtkIconSize icon_size);
Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, gchar const *prefs_sice);
-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 *sp_get_icon_image(Glib::ustring icon_name, Gtk::IconSize icon_size);
Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gchar const *prefs_sice);
GtkWidget *sp_get_icon_image(Glib::ustring icon_name, GtkIconSize icon_size);
#endif // SEEN_INK_STOCK_ITEMS_H