diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-03-27 17:08:49 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-03-27 17:08:49 +0000 |
| commit | 1ab3b2fcc1b2d3d08e4572a48b1922bf0e651cd0 (patch) | |
| tree | f165d3cfd55c9958413a38a1f302b1c7044bd86e /src/widgets | |
| parent | Remove dead code. (diff) | |
| download | inkscape-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')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 8 |
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"); + } } } |
