summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/togglebutton.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/live_effects/parameter/togglebutton.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 '')
-rw-r--r--src/live_effects/parameter/togglebutton.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index eb40a7e41..6aad8b3a6 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -13,7 +13,6 @@
#include "svg/svg.h"
#include "svg/stringstream.h"
#include "selection.h"
-#include "widgets/icon.h"
#include "inkscape.h"
#include "verbs.h"
#include "helper-fns.h"
@@ -26,7 +25,7 @@ ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::us
const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr,
Effect* effect, bool default_value, const Glib::ustring& inactive_label,
char const * _icon_active, char const * _icon_inactive,
- Inkscape::IconSize _icon_size)
+ GtkIconSize _icon_size)
: Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value),
inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size)
{
@@ -105,9 +104,9 @@ ToggleButtonParam::param_newWidget()
gtk_widget_show(box_button);
GtkWidget *icon_button = NULL;
if(!value){
- icon_button = sp_icon_new(_icon_size, _icon_inactive);
+ icon_button = gtk_image_new_from_icon_name(_icon_inactive, _icon_size);
} else {
- icon_button = sp_icon_new(_icon_size, _icon_active);
+ icon_button = gtk_image_new_from_icon_name(_icon_active, _icon_size);
}
gtk_widget_show(icon_button);
gtk_box_pack_start (GTK_BOX(box_button), icon_button, false, false, 1);
@@ -153,11 +152,10 @@ ToggleButtonParam::refresh_button()
if ( _icon_active ) {
GdkPixbuf * icon_pixbuf = NULL;
if(!value){
- icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_inactive );
+ gtk_image_set_from_icon_name (GTK_IMAGE(g_list_nth_data(childs, 0)), _icon_inactive, _icon_size);
} else {
- icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_active );
+ gtk_image_set_from_icon_name (GTK_IMAGE(g_list_nth_data(childs, 0)), _icon_active, _icon_size);
}
- gtk_image_set_from_pixbuf (GTK_IMAGE(g_list_nth_data(childs, 0)), icon_pixbuf);
}
}