summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/combo-tool-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/combo-tool-item.cpp')
-rw-r--r--src/ui/widget/combo-tool-item.cpp16
1 files changed, 14 insertions, 2 deletions
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 <iostream>
#include <utility>
#include <gtkmm/toolitem.h>
@@ -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);