summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-01-26 17:42:42 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-01-27 00:41:20 +0000
commita266e9f871e38a28d1a3f7d5c8732590e5e4fecd (patch)
treef964f4f8a13ce466ec26f084713c3b50033786cc /src
parentFix compiling errors (diff)
downloadinkscape-a266e9f871e38a28d1a3f7d5c8732590e5e4fecd.tar.gz
inkscape-a266e9f871e38a28d1a3f7d5c8732590e5e4fecd.zip
Add desktop function to know we are on dark theme
Diffstat (limited to 'src')
-rw-r--r--src/desktop.cpp6
-rw-r--r--src/desktop.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 4e3a28243..20c4914a4 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1293,6 +1293,12 @@ SPDesktop::is_iconified()
return 0!=(window_state & GDK_WINDOW_STATE_ICONIFIED);
}
+bool
+SPDesktop::is_darktheme()
+{
+ return getToplevel()->get_style_context()->has_class("dark");
+}
+
void
SPDesktop::iconify()
{
diff --git a/src/desktop.h b/src/desktop.h
index 539e55935..d4babf61f 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -417,6 +417,7 @@ public:
void toggleToolbar(gchar const *toolbar_name);
bool is_iconified();
+ bool is_darktheme();
bool is_maximized();
bool is_fullscreen();
bool is_focusMode();