summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/layers.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-07-21 02:55:31 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-07-21 02:55:31 +0000
commit75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959 (patch)
treee31f9e32ffa511bb495fc75eac6484681798e0d2 /src/ui/dialog/layers.cpp
parentCMake/MSYS2: Update for enchant-2 (diff)
downloadinkscape-75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959.tar.gz
inkscape-75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959.zip
adding gtk-theme
Diffstat (limited to 'src/ui/dialog/layers.cpp')
-rw-r--r--src/ui/dialog/layers.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index fe528d34d..bfd0e05e3 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -30,11 +30,13 @@
#include "verbs.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "object/sp-root.h"
#include "svg/css-ostringstream.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/tools/tool-base.h"
#include "ui/widget/imagetoggler.h"
@@ -85,7 +87,7 @@ void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned i
bool set = false;
if ( iconName ) {
- GtkWidget *child = gtk_image_new_from_icon_name( iconName, GTK_ICON_SIZE_SMALL_TOOLBAR );
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add( *Gtk::manage(Glib::wrap(child)) );
btn.set_relief(Gtk::RELIEF_NONE);
@@ -97,7 +99,7 @@ void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned i
if ( verb ) {
SPAction *action = verb->get_action(Inkscape::ActionContext(desktop));
if ( !set && action && action->image ) {
- GtkWidget *child = gtk_image_new_from_icon_name( action->image, GTK_ICON_SIZE_SMALL_TOOLBAR );
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(action->image, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add( *Gtk::manage(Glib::wrap(child)) );
set = true;
@@ -121,8 +123,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code
const char* label = nullptr;
if ( iconName ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( iconName, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(iconName, Gtk::ICON_SIZE_MENU));
}
if ( desktop ) {
@@ -130,8 +131,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code
if ( verb ) {
SPAction *action = verb->get_action(Inkscape::ActionContext(desktop));
if ( !iconWidget && action && action->image ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( action->image, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(action->image, Gtk::ICON_SIZE_MENU));
}
if ( action ) {