Mercurial > hg > svgui
changeset 1452:8b7f797bca86 single-point
Make inversion configurable in settings
author | Chris Cannam |
---|---|
date | Fri, 03 May 2019 17:45:39 +0100 |
parents | f72fb7fac92a |
children | 39f1154c0e97 |
files | widgets/IconLoader.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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;