summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-01-15 13:34:28 -0800
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-01-22 20:07:35 +0000
commit631f68c97280436b4d241865d9a1d33fc9444691 (patch)
tree2c5871735113763cffe2fa80a64e5611b58bde9b /src
parentd80b0eb12c477592b590b768e21dc26c137beadc (diff)
QFusionStyle: Set alpha on color before creating pen
This affected PE_IndicatorCheckBox in some cases. Change-Id: I6f10dabd2ca4093f4c1bdaa2bd0ebf73c02e8d12 Task-number: QTBUG-65737 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Yulong Bai <yulong.bai@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 0b56c1e3a8..e6ad0fc898 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -798,16 +798,14 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
painter->setPen(QPen(checkMarkColor, 1));
painter->setBrush(gradient);
painter->drawRect(rect.adjusted(checkMarkPadding, checkMarkPadding, -checkMarkPadding, -checkMarkPadding));
-
- } else if (checkbox->state & (State_On)) {
+ } else if (checkbox->state & State_On) {
qreal penWidth = QStyleHelper::dpiScaled(1.8);
penWidth = qMax(penWidth , 0.18 * rect.height());
penWidth = qMin(penWidth , 0.30 * rect.height());
- QPen checkPen = QPen(checkMarkColor, penWidth);
checkMarkColor.setAlpha(210);
- painter->translate(-0.8, 0.5);
- painter->setPen(checkPen);
+ painter->setPen(QPen(checkMarkColor, penWidth));
painter->setBrush(Qt::NoBrush);
+ painter->translate(-0.8, 0.5);
// Draw checkmark
QPainterPath path;