diff options
Diffstat (limited to 'src/ui/tools/tool-base.cpp')
| -rw-r--r-- | src/ui/tools/tool-base.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp index 1dc4ad2fb..64dbf53bc 100644 --- a/src/ui/tools/tool-base.cpp +++ b/src/ui/tools/tool-base.cpp @@ -1157,8 +1157,23 @@ void sp_event_root_menu_popup(SPDesktop *desktop, SPItem *item, GdkEvent *event) } ContextMenu* CM = new ContextMenu(desktop, item); + Gtk::Window *window = SP_ACTIVE_DESKTOP->getToplevel(); + if (window) { + if (window->get_style_context()->has_class("dark")) { + CM->get_style_context()->add_class("dark"); + } else { + CM->get_style_context()->add_class("bright"); + } + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool("/theme/symbolicIcons", false)) { + CM->get_style_context()->add_class("symbolic"); + } else { + CM->get_style_context()->add_class("regular"); + } + } CM->show(); + switch (event->type) { case GDK_BUTTON_PRESS: case GDK_KEY_PRESS: |
