summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2011-11-11 12:03:02 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-11 12:03:10 (GMT)
commit22c7a2f69e833789e9b5613f809ea43561624482 (patch)
treed3c00039af9c5103581e6e5d71971b48a0d51b14
parentcb2d647c1d4c01f3ab6131d7044b5afff2e5a434 (diff)
downloadQt-22c7a2f69e833789e9b5613f809ea43561624482.zip
Qt-22c7a2f69e833789e9b5613f809ea43561624482.tar.gz
Qt-22c7a2f69e833789e9b5613f809ea43561624482.tar.bz2
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>
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 1c1713c..8f0e602 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2920,10 +2920,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);