summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/addtoicon.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/addtoicon.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/addtoicon.cpp')
-rw-r--r--src/ui/widget/addtoicon.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index 70516ed00..e5119fc60 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -16,7 +16,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
#include "layertypeicon.h"
@@ -33,7 +32,10 @@ AddToIcon::AddToIcon() :
// _property_pixbuf_add(*this, "pixbuf_on", Glib::RefPtr<Gdk::Pixbuf>(0))
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_BUTTON);
+
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &width, &height);
+ phys = width; // Assumes that we have a square icon?
// Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
//
@@ -43,8 +45,6 @@ AddToIcon::AddToIcon() :
// if (icon_theme->has_icon(_pixAddName)) {
// _property_pixbuf_add = icon_theme->load_icon(_pixAddName, phys, (Gtk::IconLookupFlags)0);
// }
-//
-// _property_pixbuf_add = Gtk::Widget::
set_pixbuf();
}
@@ -104,8 +104,10 @@ void AddToIcon::set_pixbuf()
{
bool active = property_active().get_value();
- GdkPixbuf *pixbuf = sp_pixbuf_new(Inkscape::ICON_SIZE_BUTTON, active ? INKSCAPE_ICON("list-add") : INKSCAPE_ICON("edit-delete"));
- property_pixbuf() = Glib::wrap(pixbuf);
+ auto icon_theme = Gtk::IconTheme::get_default();
+
+ property_pixbuf() = icon_theme->load_icon(active ? "list-add" : "edit-delete",
+ phys);
}