summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/combo-tool-item.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-04 15:58:19 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-09-07 21:48:33 +0000
commit6912a5c6facae829bd491b09531fbfcdcb58e7db (patch)
treeeab08f03b4885794ff42277a03af8e1e6b546786 /src/ui/widget/combo-tool-item.cpp
parentImproved selection on lines over paragraphs (diff)
downloadinkscape-6912a5c6facae829bd491b09531fbfcdcb58e7db.tar.gz
inkscape-6912a5c6facae829bd491b09531fbfcdcb58e7db.zip
Add Text direction icons
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);