diff widgets/IconLoader.cpp @ 1459:42c87368287c

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:52 +0100
parents 8b7f797bca86
children 705d1d979ae4
line wrap: on
line diff
--- a/widgets/IconLoader.cpp	Wed Apr 24 11:29:53 2019 +0100
+++ b/widgets/IconLoader.cpp	Fri May 17 10:02:52 2019 +0100
@@ -21,6 +21,7 @@
 #include <QPalette>
 #include <QFile>
 #include <QSvgRenderer>
+#include <QSettings>
 
 #include <vector>
 #include <set>
@@ -73,6 +74,11 @@
 bool
 IconLoader::shouldInvert() const
 {
+    QSettings settings;
+    settings.beginGroup("IconLoader");
+    if (!settings.value("invert-icons-on-dark-background", true).toBool()) {
+        return false;
+    }
     QColor bg = QApplication::palette().window().color();
     bool darkBackground = (bg.red() + bg.green() + bg.blue() <= 384);
     return darkBackground;