summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-03-27 17:08:49 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-03-27 17:08:49 +0000
commit1ab3b2fcc1b2d3d08e4572a48b1922bf0e651cd0 (patch)
treef165d3cfd55c9958413a38a1f302b1c7044bd86e /src/widgets/desktop-widget.cpp
parentRemove dead code. (diff)
downloadinkscape-1ab3b2fcc1b2d3d08e4572a48b1922bf0e651cd0.tar.gz
inkscape-1ab3b2fcc1b2d3d08e4572a48b1922bf0e651cd0.zip
Add window class along dark/bright to mark APP is using symbolic icons or regular to allow apply diferent rules in icon contesx. For example allow use icons by css only (and sufix properly with "-symbolic" when necesary
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index d4b52b34a..6a021312f 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -885,6 +885,7 @@ sp_desktop_widget_realize (GtkWidget *widget)
{
SPDesktopWidget *dtw = SP_DESKTOP_WIDGET (widget);
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (GTK_WIDGET_CLASS (dtw_parent_class)->realize)
(* GTK_WIDGET_CLASS (dtw_parent_class)->realize) (widget);
@@ -919,6 +920,13 @@ sp_desktop_widget_realize (GtkWidget *widget)
window->get_style_context()->add_class("bright");
window->get_style_context()->remove_class("dark");
}
+ if (prefs->getBool("/theme/symbolicIcons", false)) {
+ window->get_style_context()->add_class("symbolic");
+ window->get_style_context()->remove_class("regular");
+ } else {
+ window->get_style_context()->add_class("regular");
+ window->get_style_context()->remove_class("symbolic");
+ }
}
}