From 19fb11b30039b2a63eab51e2e0fcf9e447a5dba8 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sun, 28 Jul 2019 21:36:35 +0200 Subject: Fix for bug https://gitlab.com/inkscape/inbox/issues/699 --- src/ui/tools/tool-base.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ui/tools/tool-base.cpp') 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: -- cgit v1.2.3