diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-07-21 02:55:31 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-07-21 02:55:31 +0000 |
| commit | 75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959 (patch) | |
| tree | e31f9e32ffa511bb495fc75eac6484681798e0d2 /src/ui/widget/dock-item.cpp | |
| parent | CMake/MSYS2: Update for enchant-2 (diff) | |
| download | inkscape-75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959.tar.gz inkscape-75d662f71d8eeb4b1c83e9bb61c1bd56f9b0e959.zip | |
adding gtk-theme
Diffstat (limited to 'src/ui/widget/dock-item.cpp')
| -rw-r--r-- | src/ui/widget/dock-item.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 7cd841d88..c85abd6de 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -10,11 +10,11 @@ #include "ui/widget/dock.h" #include "desktop.h" +#include "helper/icon-loader.h" #include "inkscape.h" #include "ui/icon-names.h" - -#include <gtkmm/icontheme.h> #include <glibmm/exceptionhandler.h> +#include <gtkmm/icontheme.h> namespace Inkscape { namespace UI { @@ -31,6 +31,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l _grab_focus_on_realize(false), _gdl_dock_item(nullptr) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); GdlDockItemBehavior gdl_dock_behavior = (prefs->getBool("/options/dock/cancenterdock", true) ? @@ -39,17 +40,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l if (!icon_name.empty()) { - Glib::RefPtr<Gtk::IconTheme> iconTheme = Gtk::IconTheme::get_default(); - - int width = 0; - int height = 0; - Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); - try { - _icon_pixbuf = iconTheme->load_icon(icon_name, width); - } - catch (const Gtk::IconThemeError& e) { - std::cerr << "DocItem::DocItem(): " << e.what() << std::endl; - } + _icon_pixbuf = sp_get_icon_pixbuf(icon_name, "/toolbox/secondary"); } if ( _icon_pixbuf ) { |
