summaryrefslogtreecommitdiffstats
path: root/src
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
parentFixing symbols icon size (diff)
downloadinkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.tar.gz
inkscape-e8ea6b0969439ffb3e102e88122a04e148a5c2b3.zip
Fix compiling bug
Diffstat (limited to 'src')
-rw-r--r--src/helper/icon-loader.cpp16
-rw-r--r--src/helper/icon-loader.h3
-rw-r--r--src/live_effects/parameter/togglebutton.cpp7
-rw-r--r--src/ui/dialog/symbols.h1
4 files changed, 17 insertions, 10 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
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index 89a1c426a..674476260 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -161,13 +161,12 @@ ToggleButtonParam::refresh_button()
}
if ( _icon_active ) {
GdkPixbuf * icon_pixbuf = nullptr;
- Gtk::Image *im = dynamic_cast<Gtk::Image*>(children[0]);
- Gtk::IconSize is(_icon_size);
+ Gtk::Widget *im = dynamic_cast<Gtk::Image*>(children[0]);
if (!im) return;
if (!value) {
- im = sp_get_icon_image(_icon_inactive, is);
+ im = Glib::wrap(sp_get_icon_image(_icon_inactive, _icon_size));
} else {
- im = sp_get_icon_image(_icon_active, is);
+ im = Glib::wrap(sp_get_icon_image(_icon_active, _icon_size));
}
}
}
diff --git a/src/ui/dialog/symbols.h b/src/ui/dialog/symbols.h
index ab5453d19..d4a26ee14 100644
--- a/src/ui/dialog/symbols.h
+++ b/src/ui/dialog/symbols.h
@@ -146,7 +146,6 @@ private:
Gtk::ScrolledWindow *scroller;
Gtk::ToggleButton* fit_symbol;
Gtk::IconSize iconsize;
- Gtk::IconSize iconsize;
void setTargetDesktop(SPDesktop *desktop);
SPDesktop* current_desktop;
DesktopTracker desk_track;