From 9dfa379a29ad986254ffd966ed6e886ffb176543 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sun, 21 Jul 2019 03:07:14 +0200 Subject: Make menu icon preference apply to Layers and Objects dialogs Also fix "show-icons" attribute inheritance in menus.xml and make it apply to canvas icons. --- src/ui/dialog/objects.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/dialog/objects.cpp') diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index 38fd2eba2..f0f99c219 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -257,7 +257,7 @@ Gtk::MenuItem& ObjectsPanel::_addPopupItem( SPDesktop *desktop, unsigned int cod Gtk::Label *label = Gtk::manage(new Gtk::Label(action->name, true)); label->set_xalign(0.0); - if (action->image) { + if (_show_contextmenu_icons && action->image) { item->set_name("ImageMenuItem"); // custom name to identify our "ImageMenuItems" Gtk::Image *icon = Gtk::manage(sp_get_icon_image(action->image, Gtk::ICON_SIZE_MENU)); @@ -1853,6 +1853,9 @@ ObjectsPanel::ObjectsPanel() : //Set up the pop-up menu // ------------------------------------------------------- { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + _show_contextmenu_icons = prefs->getBool("/theme/menuIcons_objects", true); + _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_RENAME, (int)BUTTON_RENAME ) ); _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_NEW, (int)BUTTON_NEW ) ); -- cgit v1.2.3