summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2011-11-11 13:03:02 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-14 10:34:55 +0100
commit61fae7e5511efdf6b320552cdb76ee0b599f8993 (patch)
treea7d9c84b7ddeefa26d90eef2531205b050c68bdb /src/widgets
parent2b8c3ff0f005221d0ccad612ffa16a5e37b78af0 (diff)
Mac: Fix the color of check marks in menus with stylesheet
Task-number: QTBUG-16989 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com> (cherry picked from commit 22c7a2f69e833789e9b5613f809ea43561624482) Change-Id: I22c7a2f69e833789e9b5613f809ea43561624482
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 8b40d1e083..59f51ce2c6 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -2851,10 +2851,14 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
QVector<QLineF> a(2);
a << QLineF(x1, y1, x2, y2);
a << QLineF(x2, y2, x3, y3);
- if (opt->palette.currentColorGroup() == QPalette::Active)
- p->setPen(QPen(Qt::white, 3));
- else
+ if (opt->palette.currentColorGroup() == QPalette::Active) {
+ if (opt->state & State_On)
+ p->setPen(QPen(opt->palette.highlightedText().color(), 3));
+ else
+ p->setPen(QPen(opt->palette.text().color(), 3));
+ } else {
p->setPen(QPen(QColor(100, 100, 100), 3));
+ }
p->save();
p->setRenderHint(QPainter::Antialiasing);
p->drawLines(a);