From 6912a5c6facae829bd491b09531fbfcdcb58e7db Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Wed, 4 Sep 2019 17:58:19 +0200 Subject: Add Text direction icons --- src/ui/widget/combo-tool-item.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/combo-tool-item.cpp') diff --git a/src/ui/widget/combo-tool-item.cpp b/src/ui/widget/combo-tool-item.cpp index 6adafe316..c3adf921f 100644 --- a/src/ui/widget/combo-tool-item.cpp +++ b/src/ui/widget/combo-tool-item.cpp @@ -14,7 +14,7 @@ */ #include "combo-tool-item.h" - +#include "preferences.h" #include #include #include @@ -106,10 +106,22 @@ ComboToolItem::populate_combobox() ComboToolItemColumns columns; if (_use_icon) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool("/theme/symbolicIcons", false)) { + auto children = _store->children(); + for (auto row : children) { + Glib::ustring icon = row[columns.col_icon]; + gint pos = icon.find("-symbolic"); + if (pos == std::string::npos) { + icon += "-symbolic"; + } + row[columns.col_icon] = icon; + } + } Gtk::CellRendererPixbuf *renderer = new Gtk::CellRendererPixbuf; renderer->set_property ("stock_size", Gtk::ICON_SIZE_LARGE_TOOLBAR); _combobox->pack_start (*renderer, false); - _combobox->add_attribute (*renderer, "icon_name", columns.col_icon ); + _combobox->add_attribute (*renderer, "icon_name", columns.col_icon ); } else if (_use_pixbuf) { Gtk::CellRendererPixbuf *renderer = new Gtk::CellRendererPixbuf; //renderer->set_property ("stock_size", Gtk::ICON_SIZE_LARGE_TOOLBAR); -- cgit v1.2.3