summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/imagetoggler.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-06-29 11:43:56 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-06-29 11:43:56 +0000
commit22d06152d0fabc7fe50bb6829f00b2bac4ed1796 (patch)
tree9c6a9e59aedecd67f2a5e1a83d3c6c0b8541069a /src/ui/widget/imagetoggler.cpp
parentRevert "color wheel: Temp fix for Gtk+ style properties" (diff)
downloadinkscape-22d06152d0fabc7fe50bb6829f00b2bac4ed1796.tar.gz
inkscape-22d06152d0fabc7fe50bb6829f00b2bac4ed1796.zip
Remove old icon handling code
Diffstat (limited to 'src/ui/widget/imagetoggler.cpp')
-rw-r--r--src/ui/widget/imagetoggler.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp
index 987cc67bb..81d0edd47 100644
--- a/src/ui/widget/imagetoggler.cpp
+++ b/src/ui/widget/imagetoggler.cpp
@@ -13,7 +13,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
@@ -32,15 +31,12 @@ ImageToggler::ImageToggler( char const* on, char const* off) :
_property_pixbuf_off(*this, "pixbuf_off", Glib::RefPtr<Gdk::Pixbuf>(0))
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- int phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION);
- Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
- if (!icon_theme->has_icon(_pixOnName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOnName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixOffName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOffName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+ int phys = width;
+
+ Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
if (icon_theme->has_icon(_pixOnName)) {