summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index e6e2e75c4e..4dd92c1a0c 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -174,7 +174,10 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
if (opt->state & (State_Sunken | State_On)) {
ir.adjust(2, 2, -2, -2);
p->setBrush(opt->palette.foreground());
+ bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);
+ p->setRenderHint(QPainter::Qt4CompatiblePainting);
p->drawEllipse(ir);
+ p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);
}
break; }
case PE_FrameFocusRect:
@@ -530,6 +533,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->translate(sx + bsx, sy + bsy);
p->setPen(opt->palette.buttonText().color());
p->setBrush(opt->palette.buttonText());
+ p->setRenderHint(QPainter::Qt4CompatiblePainting);
p->drawPolygon(a);
p->restore();
break; }
@@ -1579,7 +1583,10 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
}
p->setPen(tb->palette.mid().color().darker(150));
+ bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);
+ p->setRenderHint(QPainter::Qt4CompatiblePainting);
p->drawPolygon(a);
+ p->setRenderHint(QPainter::Qt4CompatiblePainting, oldQt4CompatiblePainting);
p->setPen(tb->palette.light().color());
if (tb->direction != Qt::RightToLeft) {
p->drawLine(0, 2, tb->rect.width() - d, 2);
@@ -3487,6 +3494,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
p->setPen(Qt::NoPen);
p->setBrush(pal.button());
+ p->setRenderHint(QPainter::Qt4CompatiblePainting);
p->drawPolygon(arrow);
a = QStyleHelper::angle(QPointF(width / 2, height / 2), arrow[0]);