diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-21 01:07:14 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-21 01:07:14 +0000 |
| commit | 9dfa379a29ad986254ffd966ed6e886ffb176543 (patch) | |
| tree | 14ea92afaa4a251a966e0381b2c561aeb2435227 /src/ui/dialog/layers.cpp | |
| parent | Simplify code for context menu items of Layers and Objects dialogs (diff) | |
| download | inkscape-9dfa379a29ad986254ffd966ed6e886ffb176543.tar.gz inkscape-9dfa379a29ad986254ffd966ed6e886ffb176543.zip | |
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.
Diffstat (limited to 'src/ui/dialog/layers.cpp')
| -rw-r--r-- | src/ui/dialog/layers.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index 9f57bbe60..e2aa4e2c9 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -129,7 +129,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code 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)); @@ -870,6 +870,8 @@ LayersPanel::LayersPanel() : // ------------------------------------------------------- { + _show_contextmenu_icons = prefs->getBool("/theme/menuIcons_layers", true); + _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_NEW, (int)BUTTON_NEW ) ); _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_RENAME, (int)BUTTON_RENAME ) ); |
