From e3bad705be66f20b802ece4cd7ddbaa2dcafe578 Mon Sep 17 00:00:00 2001 From: "craig.p.drummond" Date: Wed, 19 Sep 2012 19:41:59 +0000 Subject: [PATCH] Fix icon colour --- widgets/icon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widgets/icon.cpp b/widgets/icon.cpp index 2c794b53f..e9028f651 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -79,7 +79,10 @@ static QIcon createIcon(bool isSingle) QColor stdColor=QColor(QApplication::palette().color(QPalette::Active, QPalette::WindowText)); if (stdColor==Qt::white) { stdColor=QColor(200, 200, 200); - } + } else if (stdColor.red()<128 && stdColor.green()<128 && stdColor.blue()<128 && + stdColor.red()==stdColor.green() && stdColor.green()==stdColor.blue()) { + stdColor=Qt::black; + } QColor highlightColor=stdColor.red()<100 ? stdColor.lighter(50) : stdColor.darker(50); QList sizes=QList() << 16 << 22;