diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-09 12:42:10 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-09 12:42:10 +0000 |
| commit | 241554b7ad311b5868ba284c7a4e6a410432b9bd (patch) | |
| tree | 8bf6fed572d27e9b97ca60b90ae1684ba4856eeb /src/live_effects/parameter/togglebutton.cpp | |
| parent | Use .xml when exporting shortcuts by default (diff) | |
| parent | Shortcuts: Fix for 7d248fbba5b0c24d9a24cda8c3f2e79f96395553 (is_user_set was ... (diff) | |
| download | inkscape-241554b7ad311b5868ba284c7a4e6a410432b9bd.tar.gz inkscape-241554b7ad311b5868ba284c7a4e6a410432b9bd.zip | |
Merge branch 'master' into shortcuts
Diffstat (limited to 'src/live_effects/parameter/togglebutton.cpp')
| -rw-r--r-- | src/live_effects/parameter/togglebutton.cpp | 12 |
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); } } |
