From 1ab3b2fcc1b2d3d08e4572a48b1922bf0e651cd0 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Wed, 27 Mar 2019 18:08:49 +0100 Subject: 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 --- src/widgets/desktop-widget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widgets') 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"); + } } } -- cgit v1.2.3