summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-07-28 19:36:35 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-07-28 19:36:35 +0000
commit19fb11b30039b2a63eab51e2e0fcf9e447a5dba8 (patch)
tree6e1162634a8ca88f7e12424ce03bf4ab8aa77c65 /src
parentFix a rendering issue I introduce in previous merge (diff)
downloadinkscape-19fb11b30039b2a63eab51e2e0fcf9e447a5dba8.tar.gz
inkscape-19fb11b30039b2a63eab51e2e0fcf9e447a5dba8.zip
Fix for bug https://gitlab.com/inkscape/inbox/issues/699
Diffstat (limited to 'src')
-rw-r--r--src/ui/icon-loader.cpp10
-rw-r--r--src/ui/tools/tool-base.cpp15
2 files changed, 20 insertions, 5 deletions
diff --git a/src/ui/icon-loader.cpp b/src/ui/icon-loader.cpp
index c3182aa8f..c73273953 100644
--- a/src/ui/icon-loader.cpp
+++ b/src/ui/icon-loader.cpp
@@ -44,17 +44,17 @@ Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::BuiltinIconSize icon
return icon;
}
-GtkWidget *sp_get_icon_image(Glib::ustring icon_name, GtkIconSize icon_size)
-{
- return gtk_image_new_from_icon_name(icon_name.c_str(), icon_size);
-}
-
Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gchar const *prefs_size)
{
Gtk::IconSize icon_size = Inkscape::UI::ToolboxFactory::prefToSize_mm(prefs_size);
return sp_get_icon_image(icon_name, icon_size);
}
+GtkWidget *sp_get_icon_image(Glib::ustring icon_name, GtkIconSize icon_size)
+{
+ return gtk_image_new_from_icon_name(icon_name.c_str(), icon_size);
+}
+
Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, gint size)
{
Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
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: