diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-28 19:36:35 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-28 19:36:35 +0000 |
| commit | 19fb11b30039b2a63eab51e2e0fcf9e447a5dba8 (patch) | |
| tree | 6e1162634a8ca88f7e12424ce03bf4ab8aa77c65 /src/ui/tools/tool-base.cpp | |
| parent | Fix a rendering issue I introduce in previous merge (diff) | |
| download | inkscape-19fb11b30039b2a63eab51e2e0fcf9e447a5dba8.tar.gz inkscape-19fb11b30039b2a63eab51e2e0fcf9e447a5dba8.zip | |
Fix for bug https://gitlab.com/inkscape/inbox/issues/699
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: |
