# HG changeset patch # User Chris Cannam # Date 1556901939 -3600 # Node ID 8b7f797bca8679d0f2f752a4003adf4a5acf3f47 # Parent f72fb7fac92acafda691a01fb960aaa3d666d21e Make inversion configurable in settings diff -r f72fb7fac92a -r 8b7f797bca86 widgets/IconLoader.cpp --- a/widgets/IconLoader.cpp Wed May 01 15:15:26 2019 +0100 +++ b/widgets/IconLoader.cpp Fri May 03 17:45:39 2019 +0100 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -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;